@ogment-ai/cli 0.9.1-next.0 → 0.9.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/README.md +10 -8
- package/dist/cli.js +13 -9
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Ogment CLI
|
|
2
2
|
|
|
3
|
-
Agent-first CLI for discovering
|
|
3
|
+
Agent-first CLI for discovering and invoking Ogment-backed tools.
|
|
4
4
|
|
|
5
5
|
- Package: `@ogment-ai/cli`
|
|
6
6
|
- Binary: `ogment`
|
|
@@ -21,11 +21,14 @@ ogment auth login
|
|
|
21
21
|
# 2) Discover servers
|
|
22
22
|
ogment catalog
|
|
23
23
|
|
|
24
|
-
# 3)
|
|
25
|
-
ogment
|
|
24
|
+
# 3) Discover tools on one server
|
|
25
|
+
ogment catalog <server-id>
|
|
26
26
|
|
|
27
|
-
# 4)
|
|
28
|
-
ogment
|
|
27
|
+
# 4) Inspect one tool schema
|
|
28
|
+
ogment catalog <server-id> <tool-name> --example
|
|
29
|
+
|
|
30
|
+
# 5) Invoke
|
|
31
|
+
ogment invoke <server-id> <tool-name> --input '{}'
|
|
29
32
|
```
|
|
30
33
|
|
|
31
34
|
## Common Commands
|
|
@@ -35,10 +38,9 @@ ogment auth login
|
|
|
35
38
|
ogment auth status
|
|
36
39
|
ogment auth logout
|
|
37
40
|
|
|
38
|
-
ogment catalog
|
|
41
|
+
ogment catalog [server-id] [tool-name]
|
|
39
42
|
|
|
40
|
-
ogment
|
|
41
|
-
ogment execute <server-id> --code 'return input' --input '{}'
|
|
43
|
+
ogment invoke <server-id> <tool-name> --input '{}'
|
|
42
44
|
ogment status
|
|
43
45
|
```
|
|
44
46
|
|
package/dist/cli.js
CHANGED
|
@@ -8798,9 +8798,9 @@ const DEFAULT_OGMENT_BASE_URL = "https://dashboard.ogment.ai";
|
|
|
8798
8798
|
* These are injected by Rolldown `transform.define` during release builds.
|
|
8799
8799
|
* Runtime env vars (`OGMENT_CLI_SENTRY_*`) can still override them.
|
|
8800
8800
|
*/
|
|
8801
|
-
const SENTRY_DSN_BUILD =
|
|
8802
|
-
const SENTRY_ENVIRONMENT_BUILD =
|
|
8803
|
-
const SENTRY_RELEASE_BUILD =
|
|
8801
|
+
const SENTRY_DSN_BUILD = "https://4219ab98670b61086758b4d0e31ae318@o4507724844957696.ingest.us.sentry.io/4510992932405248";
|
|
8802
|
+
const SENTRY_ENVIRONMENT_BUILD = "production";
|
|
8803
|
+
const SENTRY_RELEASE_BUILD = "cli-v0.9.1+git:99e999ee0";
|
|
8804
8804
|
const packageJsonSchema = object({ version: string().min(1) });
|
|
8805
8805
|
const hasCode = (value, code) => {
|
|
8806
8806
|
if (typeof value !== "object" || value === null) return false;
|
|
@@ -13738,8 +13738,11 @@ const cacheSchema = object({
|
|
|
13738
13738
|
latestVersion: string().optional()
|
|
13739
13739
|
});
|
|
13740
13740
|
const isPrereleaseVersion = (version) => {
|
|
13741
|
-
|
|
13742
|
-
|
|
13741
|
+
return (import_semver.default.parse(version)?.prerelease.length ?? 0) > 0;
|
|
13742
|
+
};
|
|
13743
|
+
const normalizeLatestVersionCandidate = (version) => {
|
|
13744
|
+
if (version === void 0 || isPrereleaseVersion(version)) return;
|
|
13745
|
+
return version;
|
|
13743
13746
|
};
|
|
13744
13747
|
const isTruthyEnvValue = (value) => {
|
|
13745
13748
|
if (value === void 0) return false;
|
|
@@ -13807,18 +13810,19 @@ const maybeGetAvailableCliUpdate = async (options, deps = {}) => {
|
|
|
13807
13810
|
const cachePath = cachePathFromConfigDir(options.configDir ?? defaultConfigDir());
|
|
13808
13811
|
let latestVersion;
|
|
13809
13812
|
const existingCache = readCache(cachePath);
|
|
13813
|
+
const cachedLatestVersion = normalizeLatestVersionCandidate(existingCache?.latestVersion);
|
|
13810
13814
|
const nowMs = now().getTime();
|
|
13811
13815
|
if (existingCache === void 0 || nowMs - existingCache.lastCheckedAtMs >= UPDATE_CHECK_INTERVAL_MS) {
|
|
13812
13816
|
try {
|
|
13813
|
-
latestVersion = await fetchWithTimeout(options.packageName, fetchLatestVersion);
|
|
13817
|
+
latestVersion = normalizeLatestVersionCandidate(await fetchWithTimeout(options.packageName, fetchLatestVersion)) ?? cachedLatestVersion;
|
|
13814
13818
|
} catch {
|
|
13815
|
-
latestVersion =
|
|
13819
|
+
latestVersion = cachedLatestVersion;
|
|
13816
13820
|
}
|
|
13817
13821
|
writeCache(cachePath, {
|
|
13818
13822
|
...latestVersion === void 0 ? {} : { latestVersion },
|
|
13819
13823
|
lastCheckedAtMs: nowMs
|
|
13820
13824
|
});
|
|
13821
|
-
} else latestVersion =
|
|
13825
|
+
} else latestVersion = cachedLatestVersion;
|
|
13822
13826
|
if (latestVersion !== void 0 && isNewerVersion(latestVersion, options.currentVersion)) return {
|
|
13823
13827
|
currentVersion: options.currentVersion,
|
|
13824
13828
|
latestVersion,
|
|
@@ -72556,4 +72560,4 @@ if (shouldExecuteCli(import.meta.url, process.argv[1])) await executeCli();
|
|
|
72556
72560
|
|
|
72557
72561
|
//#endregion
|
|
72558
72562
|
export { executeCli, runCli, shouldExecuteCli };
|
|
72559
|
-
//# debugId=
|
|
72563
|
+
//# debugId=75a9f438-9e34-4abd-88d2-6cd8a68d9950
|