@aident-ai/cli 0.1.8-rc.0 → 0.1.8-rc.2
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/cli.mjs +33 -22
- package/package.json +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -598,7 +598,7 @@ function normalizeBaseUrl(url) {
|
|
|
598
598
|
}
|
|
599
599
|
|
|
600
600
|
// src/version.ts
|
|
601
|
-
var VERSION = "0.1.8-rc.
|
|
601
|
+
var VERSION = "0.1.8-rc.2";
|
|
602
602
|
|
|
603
603
|
// src/catalogCache.ts
|
|
604
604
|
var CACHE_TTL_MS = 5 * 60 * 1000;
|
|
@@ -6179,6 +6179,30 @@ function mergeCatalogs(catalogs, packages, onCommand) {
|
|
|
6179
6179
|
// src/credentials.ts
|
|
6180
6180
|
import { mkdir as mkdir5, readFile as readFile6, rm, writeFile as writeFile5 } from "node:fs/promises";
|
|
6181
6181
|
import { join as join7 } from "node:path";
|
|
6182
|
+
|
|
6183
|
+
// ../web/shared/loadout/AidentCredentialOrigin.mjs
|
|
6184
|
+
function getSharedAidentOrigin(value) {
|
|
6185
|
+
try {
|
|
6186
|
+
const url = new URL(value);
|
|
6187
|
+
if (url.protocol !== "https:" || url.port !== "" || url.pathname !== "/" || url.search !== "" || url.hash !== "" || url.username !== "" || url.password !== "" || url.hostname !== "aident.ai" && !url.hostname.endsWith(".aident.ai")) {
|
|
6188
|
+
return null;
|
|
6189
|
+
}
|
|
6190
|
+
return url.origin;
|
|
6191
|
+
} catch {
|
|
6192
|
+
return null;
|
|
6193
|
+
}
|
|
6194
|
+
}
|
|
6195
|
+
function resolveAidentCredentialBaseUrl(credentialsBaseUrl, requestedBaseUrl) {
|
|
6196
|
+
const credentialsUrl = credentialsBaseUrl.replace(/\/+$/, "");
|
|
6197
|
+
const requestedUrl = requestedBaseUrl.replace(/\/+$/, "");
|
|
6198
|
+
if (credentialsUrl === requestedUrl)
|
|
6199
|
+
return requestedUrl;
|
|
6200
|
+
if (!getSharedAidentOrigin(credentialsUrl))
|
|
6201
|
+
return null;
|
|
6202
|
+
return getSharedAidentOrigin(requestedUrl);
|
|
6203
|
+
}
|
|
6204
|
+
|
|
6205
|
+
// src/credentials.ts
|
|
6182
6206
|
var REFRESH_WINDOW_MS = 24 * 60 * 60 * 1000;
|
|
6183
6207
|
function getCredentialsFile() {
|
|
6184
6208
|
return join7(getAidentDir(), "credentials.json");
|
|
@@ -6202,16 +6226,8 @@ async function clearCredentials() {
|
|
|
6202
6226
|
await rm(getCredentialsFile(), { force: true });
|
|
6203
6227
|
}
|
|
6204
6228
|
function credentialsForBaseUrl(creds, baseUrl) {
|
|
6205
|
-
const
|
|
6206
|
-
|
|
6207
|
-
if (credentialsBaseUrl === requestedBaseUrl)
|
|
6208
|
-
return { ...creds, base_url: requestedBaseUrl };
|
|
6209
|
-
if (!getSharedAidentBaseUrl(credentialsBaseUrl))
|
|
6210
|
-
return null;
|
|
6211
|
-
const sharedBaseUrl = getSharedAidentBaseUrl(requestedBaseUrl);
|
|
6212
|
-
if (!sharedBaseUrl)
|
|
6213
|
-
return null;
|
|
6214
|
-
return { ...creds, base_url: sharedBaseUrl };
|
|
6229
|
+
const resolvedBaseUrl = resolveAidentCredentialBaseUrl(creds.base_url, baseUrl);
|
|
6230
|
+
return resolvedBaseUrl ? { ...creds, base_url: resolvedBaseUrl } : null;
|
|
6215
6231
|
}
|
|
6216
6232
|
async function clearCredentialsForIncompatibleBaseUrl(baseUrl) {
|
|
6217
6233
|
const creds = await readCredentials();
|
|
@@ -6228,17 +6244,6 @@ function isExpired(creds) {
|
|
|
6228
6244
|
return false;
|
|
6229
6245
|
return Date.now() >= expiresAt - REFRESH_WINDOW_MS;
|
|
6230
6246
|
}
|
|
6231
|
-
function getSharedAidentBaseUrl(baseUrl) {
|
|
6232
|
-
try {
|
|
6233
|
-
const url = new URL(baseUrl);
|
|
6234
|
-
if (url.protocol !== "https:" || url.port !== "" || url.pathname !== "/" || url.search !== "" || url.hash !== "" || url.username !== "" || url.password !== "" || url.hostname !== "aident.ai" && !url.hostname.endsWith(".aident.ai")) {
|
|
6235
|
-
return null;
|
|
6236
|
-
}
|
|
6237
|
-
return url.origin;
|
|
6238
|
-
} catch {
|
|
6239
|
-
return null;
|
|
6240
|
-
}
|
|
6241
|
-
}
|
|
6242
6247
|
|
|
6243
6248
|
// src/doctor.ts
|
|
6244
6249
|
import { existsSync as existsSync2 } from "node:fs";
|
|
@@ -6665,6 +6670,12 @@ import path from "node:path";
|
|
|
6665
6670
|
|
|
6666
6671
|
// ../web/shared/integrations/LoadoutSkillConstants.ts
|
|
6667
6672
|
var LOADOUT_SKILL_ENTRYPOINT = "SKILL.md";
|
|
6673
|
+
var LOADOUT_SKILL_PLATFORM_SECTION_HEADING = "Aident Loadout Platform";
|
|
6674
|
+
var LOADOUT_SKILL_PLATFORM_SECTION = `## **${LOADOUT_SKILL_PLATFORM_SECTION_HEADING}**
|
|
6675
|
+
|
|
6676
|
+
This Skill is authored, published, and distributed through [**Aident Loadout**](https://loadout.aident.ai/), a platform that enables agents to connect securely with more than 1,000 popular apps and tools.
|
|
6677
|
+
|
|
6678
|
+
Before using this Skill, verify that the Aident Loadout Skill, CLI, Plugin, or MCP is installed globally in the current environment. If Aident Loadout is already available, continue with this Skill and complete any setup required by the selected integrations. If it is unavailable or its installation status is uncertain, follow the [**Aident Loadout setup instructions**](https://aident.ai/SETUP.md). After installation is verified, return to the campaign brief and continue.`;
|
|
6668
6679
|
var LOADOUT_SKILL_NAME_PATTERN = /^skill:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/;
|
|
6669
6680
|
var LOADOUT_SKILL_MAX_FILE_COUNT = 50;
|
|
6670
6681
|
var LOADOUT_SKILL_MAX_PACKAGE_BYTES = 256 * 1024;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aident-ai/cli",
|
|
3
|
-
"version": "0.1.8-rc.
|
|
3
|
+
"version": "0.1.8-rc.2",
|
|
4
4
|
"description": "Aident CLI — umbrella access to Loadout integrations, Playbook automation, Intern tools, and the Aident platform.",
|
|
5
5
|
"homepage": "https://aident.ai",
|
|
6
6
|
"repository": {
|