@astra-cli/cli 1.1.8 → 1.1.9

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 (2) hide show
  1. package/dist/astra.js +19 -6
  2. package/package.json +1 -1
package/dist/astra.js CHANGED
@@ -21,6 +21,12 @@ var PluginManifestSchema = z.object({
21
21
  * Falls back to description if not set.
22
22
  */
23
23
  tagline: z.string().optional(),
24
+ /**
25
+ * URL where skill.md is hosted (the original install URL).
26
+ * Used to refresh skill.md context. Saved automatically by addPlugin().
27
+ * If absent, the locally installed copy is used without a network fetch.
28
+ */
29
+ skillUrl: z.string().url().optional(),
24
30
  /**
25
31
  * Optional engine extension flags — declared by built-in plugins that need
26
32
  * features beyond the base engine (api_call, memory, config, wallet).
@@ -1470,14 +1476,18 @@ var TTL_24H = 24 * 60 * 60 * 1e3;
1470
1476
  async function fetchRemoteContext(name) {
1471
1477
  const manifest = getActiveManifest();
1472
1478
  const cacheKey = `${manifest.name}:${name}`;
1473
- const content = await getCached(cacheKey, `${manifest.apiBase}/${name}`, TTL_24H);
1474
- if (content === null && name === "skill.md") {
1479
+ if (name === "skill.md") {
1480
+ if (manifest.skillUrl) {
1481
+ const content = await getCached(cacheKey, manifest.skillUrl, TTL_24H);
1482
+ if (content !== null) return content;
1483
+ }
1475
1484
  const localPath = pluginSkillPath(manifest.name);
1476
1485
  if (fs4.existsSync(localPath)) {
1477
1486
  return fs4.readFileSync(localPath, "utf-8");
1478
1487
  }
1488
+ return null;
1479
1489
  }
1480
- return content;
1490
+ return getCached(cacheKey, `${manifest.apiBase}/${name}`, TTL_24H);
1481
1491
  }
1482
1492
  async function getSkillContext() {
1483
1493
  return await fetchRemoteContext("skill.md") ?? "";
@@ -4262,8 +4272,9 @@ async function addPlugin(manifestUrl) {
4262
4272
  clack5.outro("Installation cancelled.");
4263
4273
  process.exit(0);
4264
4274
  }
4275
+ const manifestWithSkillUrl = { ...manifest, skillUrl: urlResult.url.toString() };
4265
4276
  try {
4266
- savePluginToDisk(manifest, skillMdContent);
4277
+ savePluginToDisk(manifestWithSkillUrl, skillMdContent);
4267
4278
  } catch (err) {
4268
4279
  clack5.log.error(
4269
4280
  `Failed to save plugin: ${err instanceof Error ? err.message : String(err)}`
@@ -4271,7 +4282,7 @@ async function addPlugin(manifestUrl) {
4271
4282
  clack5.outro("Installation failed.");
4272
4283
  process.exit(1);
4273
4284
  }
4274
- setActivePlugin(manifest.name);
4285
+ setActivePlugin(manifestWithSkillUrl.name);
4275
4286
  clack5.outro(
4276
4287
  `Plugin "${manifest.name}" installed successfully.
4277
4288
  Run \`astra\` to load it, or \`astra --plugin ${manifest.name}\` for this session only.`
@@ -4356,6 +4367,7 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
4356
4367
  var POLL_INTERVAL_MS = 6e4;
4357
4368
  var StatusBar = React.memo(function StatusBar2({
4358
4369
  agentName,
4370
+ pluginName,
4359
4371
  journeyStage,
4360
4372
  autopilotMode = "off",
4361
4373
  autopilotIntervalMs = 3e5,
@@ -4392,7 +4404,7 @@ var StatusBar = React.memo(function StatusBar2({
4392
4404
  const apActive = autopilotMode !== "off";
4393
4405
  return /* @__PURE__ */ jsx(Box, { flexDirection: "column", width: "100%", children: /* @__PURE__ */ jsxs(Box, { paddingX: 1, justifyContent: "space-between", children: [
4394
4406
  /* @__PURE__ */ jsxs(Box, { children: [
4395
- /* @__PURE__ */ jsx(Text, { bold: true, color: "#00ff00", children: "AstraNova" }),
4407
+ /* @__PURE__ */ jsx(Text, { bold: true, color: "#00ff00", children: pluginName }),
4396
4408
  /* @__PURE__ */ jsx(Text, { dimColor: true, children: " \u2502 " }),
4397
4409
  /* @__PURE__ */ jsx(Text, { color: "#ff8800", children: agentName }),
4398
4410
  canFetchData && market && /* @__PURE__ */ jsxs(Fragment, { children: [
@@ -5384,6 +5396,7 @@ ${stack}
5384
5396
  StatusBar_default,
5385
5397
  {
5386
5398
  agentName,
5399
+ pluginName: manifest.name,
5387
5400
  journeyStage: profile.journeyStage ?? "full",
5388
5401
  autopilotMode,
5389
5402
  autopilotIntervalMs,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astra-cli/cli",
3
- "version": "1.1.8",
3
+ "version": "1.1.9",
4
4
  "description": "The terminal for autonomous agents. Powered by AstraNova.",
5
5
  "type": "module",
6
6
  "bin": {