gipity 1.1.43 → 1.1.44

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.
@@ -0,0 +1,107 @@
1
+ /**
2
+ * changelog.ts - what's new in Gipity, read from the server's GET /changelog
3
+ * (platform/CHANGELOG.md), plus the small machine-level memory of what this
4
+ * user has already seen (~/.gipity/changelog.json):
5
+ *
6
+ * { "baselineCli": "1.1.42", CLI version when this file was first written;
7
+ * `--newer` starts here until something is seen
8
+ * "seenEntry": "2026-11-18-scoped-api-keys",
9
+ * "seenDate": "2026-11-18", newest entry the user (or their agent) viewed
10
+ * "noticedCli": "1.1.42" } last CLI version the update notice ran on
11
+ *
12
+ * `gipity changelog --newer` lists entries above the seen one, and after the
13
+ * CLI auto-updates the first interactive command prints one line saying how
14
+ * many there are.
15
+ */
16
+ import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'fs';
17
+ import { join } from 'path';
18
+ import { GIPITY_DIR } from './updater/state.js';
19
+ import { compareSemver } from './updater/check.js';
20
+ import { publicRequest } from './api.js';
21
+ import { muted, brand } from './colors.js';
22
+ const STATE_FILE = () => join(GIPITY_DIR, 'changelog.json');
23
+ export function readChangelogState() {
24
+ if (!existsSync(STATE_FILE()))
25
+ return null;
26
+ try {
27
+ const parsed = JSON.parse(readFileSync(STATE_FILE(), 'utf-8'));
28
+ return parsed && typeof parsed === 'object' ? parsed : null;
29
+ }
30
+ catch {
31
+ return null; // a corrupt file is rebuilt; it only remembers what was seen
32
+ }
33
+ }
34
+ export function writeChangelogState(state) {
35
+ mkdirSync(GIPITY_DIR, { recursive: true });
36
+ writeFileSync(STATE_FILE(), JSON.stringify(state, null, 2) + '\n');
37
+ }
38
+ /** Read the state, creating it with this CLI version as the baseline. */
39
+ export function ensureChangelogState(currentCli) {
40
+ const existing = readChangelogState();
41
+ if (existing)
42
+ return existing;
43
+ const fresh = { baselineCli: currentCli, noticedCli: currentCli };
44
+ writeChangelogState(fresh);
45
+ return fresh;
46
+ }
47
+ export async function fetchChangelog(query, timeoutMs) {
48
+ const params = new URLSearchParams();
49
+ if (query.since)
50
+ params.set('since', query.since);
51
+ if (query.last !== undefined)
52
+ params.set('last', String(query.last));
53
+ const res = await publicRequest('GET', `/changelog?${params}`, undefined, undefined, timeoutMs);
54
+ return res.data.entries;
55
+ }
56
+ /** Entries the user hasn't seen: above the seen entry, or (nothing seen yet)
57
+ * everything that shipped after the CLI version they started from. */
58
+ export async function fetchNewer(state, currentCli, timeoutMs) {
59
+ if (state.seenEntry && state.seenDate) {
60
+ const entries = await fetchChangelog({ since: state.seenDate }, timeoutMs);
61
+ const at = entries.findIndex((e) => e.id === state.seenEntry);
62
+ return at === -1 ? entries.filter((e) => e.date > state.seenDate) : entries.slice(0, at);
63
+ }
64
+ return fetchChangelog({ since: `cli:${state.baselineCli ?? currentCli}` }, timeoutMs);
65
+ }
66
+ /** Every filter returns entries from the newest down, so the first one shown
67
+ * is the newest the user has now seen. */
68
+ export function markSeen(state, shown) {
69
+ if (shown.length === 0)
70
+ return state;
71
+ const next = { ...state, seenEntry: shown[0].id, seenDate: shown[0].date };
72
+ writeChangelogState(next);
73
+ return next;
74
+ }
75
+ /** `gipity changelog --newer` in one line, or null when there's nothing new. */
76
+ export function updateNoticeLine(count) {
77
+ if (count <= 0)
78
+ return null;
79
+ return `${muted(`${count} update${count === 1 ? '' : 's'} since you last looked:`)} ${brand('gipity changelog --newer')}`;
80
+ }
81
+ /**
82
+ * Called before every command. Records the baseline on first run. On the first
83
+ * interactive (TTY, non-JSON) command after the CLI's version went up (the
84
+ * auto-updater installed a new one), prints one line with the number of unseen
85
+ * entries, once. Never prints off a TTY or with --json, and never delays a
86
+ * command by more than the short fetch timeout; a failed fetch prints nothing
87
+ * (the notice is a hint, and `gipity changelog --newer` reports real errors).
88
+ */
89
+ export async function maybePrintUpdateNotice(currentCli, opts) {
90
+ const state = ensureChangelogState(currentCli);
91
+ if (!opts.interactive)
92
+ return;
93
+ if (state.noticedCli && compareSemver(currentCli, state.noticedCli) <= 0)
94
+ return;
95
+ writeChangelogState({ ...state, noticedCli: currentCli });
96
+ let count;
97
+ try {
98
+ count = (await fetchNewer(state, currentCli, opts.timeoutMs ?? 2000)).length;
99
+ }
100
+ catch {
101
+ return;
102
+ }
103
+ const line = updateNoticeLine(count);
104
+ if (line)
105
+ (opts.print ?? console.log)(line);
106
+ }
107
+ //# sourceMappingURL=changelog.js.map
@@ -0,0 +1,74 @@
1
+ import { Command } from 'commander';
2
+ import { readFileSync } from 'fs';
3
+ import { join } from 'path';
4
+ import { PKG_ROOT } from '../updater/state.js';
5
+ import { run } from '../helpers/command.js';
6
+ import { bold, brand, muted, warning } from '../colors.js';
7
+ import { ensureChangelogState, fetchChangelog, fetchNewer, markSeen, } from '../changelog.js';
8
+ /** Without --newer or --since, show this many of the newest entries. */
9
+ const DEFAULT_LAST = 10;
10
+ function cliVersion() {
11
+ return JSON.parse(readFileSync(join(PKG_ROOT, 'package.json'), 'utf-8')).version;
12
+ }
13
+ /** Markdown code spans read fine in a terminal without the backticks. */
14
+ const plain = (s) => s.replace(/`([^`]+)`/g, '$1');
15
+ export function formatEntries(entries) {
16
+ const blocks = entries.map((e) => {
17
+ const versions = [e.server ? `server ${e.server}` : '', e.cli ? `CLI ${e.cli}` : ''].filter(Boolean);
18
+ const lines = [
19
+ brand(bold(e.title)),
20
+ muted([e.date, ...versions].join(', ')),
21
+ ...e.bullets.map((b) => `- ${plain(b)}`),
22
+ ];
23
+ if (e.breaking.length) {
24
+ lines.push(warning('Breaking:'));
25
+ lines.push(...e.breaking.map((b) => `- ${plain(b)}`));
26
+ }
27
+ if (e.skills.length) {
28
+ lines.push(muted(`Docs: ${e.skills.map((s) => `gipity skill read ${s}`).join(', ')}`));
29
+ }
30
+ return lines.join('\n');
31
+ });
32
+ return blocks.join('\n\n');
33
+ }
34
+ export const changelogCommand = new Command('changelog')
35
+ .description("What's new in Gipity (--newer: since you last looked)")
36
+ .option('--newer', 'Only what shipped since you (or your agent) last looked')
37
+ .option('--since <date|version>', 'What shipped since a date (yyyy-mm-dd, that day included) or after a version (1.1.40, cli:1.1.40, server:9.14.781)')
38
+ .option('--last <n>', `Only the newest n entries (default ${DEFAULT_LAST} without --newer or --since)`)
39
+ .option('--json', 'Output the entries as JSON')
40
+ .addHelpText('after', '\nAgents: run `gipity changelog --newer --json` to pull what changed since your docs into context.\n')
41
+ .action((opts) => run('Changelog', async () => {
42
+ if (opts.newer && opts.since)
43
+ throw new Error('use --newer or --since, not both');
44
+ let last;
45
+ if (opts.last !== undefined) {
46
+ last = Number(opts.last);
47
+ if (!Number.isInteger(last) || last < 1)
48
+ throw new Error('--last must be a whole number of 1 or more');
49
+ }
50
+ const current = cliVersion();
51
+ const state = ensureChangelogState(current);
52
+ let entries;
53
+ if (opts.newer) {
54
+ entries = await fetchNewer(state, current);
55
+ if (last !== undefined)
56
+ entries = entries.slice(0, last);
57
+ }
58
+ else {
59
+ entries = await fetchChangelog({ since: opts.since, last: last ?? (opts.since ? undefined : DEFAULT_LAST) });
60
+ }
61
+ markSeen(state, entries);
62
+ if (opts.json) {
63
+ console.log(JSON.stringify({ entries }, null, 2));
64
+ return;
65
+ }
66
+ if (entries.length === 0) {
67
+ console.log(opts.newer ? 'Nothing new since you last looked.' : 'No changelog entries match.');
68
+ return;
69
+ }
70
+ if (opts.newer)
71
+ console.log(muted(`${entries.length} update${entries.length === 1 ? '' : 's'} since you last looked`) + '\n');
72
+ console.log(formatEntries(entries));
73
+ }));
74
+ //# sourceMappingURL=changelog.js.map
package/dist/index.js CHANGED
@@ -7005,6 +7005,8 @@ Gipity ships first-party services for what apps usually pull from third parties
7005
7005
 
7006
7006
  When a user asks about Gipity itself - how to install it, what it costs, what's shipped, how a command or flag works - answer from an authoritative source, not memory, and don't hedge with "I don't want to guess." Check in this order: (1) \`gipity skill read <name>\` / \`gipity skill list\` - install and account basics live in \`getting-started\`; (2) \`gipity <command> --help\` for command syntax; (3) if it's genuinely not in the skills or CLI help, fetch the live site at \`https://gipity.ai\` (or web search) and cite what you found. A wrong or vague answer about the product is worse than spending one tool call to get the current, correct one.
7007
7007
 
7008
+ What's new since your docs were written: \`gipity changelog --newer --json\` lists the features and breaking changes shipped since you last looked, with the command and skill for each.
7009
+
7008
7010
  ## Plans, limits & upgrading - unblock the user
7009
7011
 
7010
7012
  Gipity runs on **credits** (the one consumable) and **plans** (Free / Gipity Pro) that set limits and the monthly credit grant. When a metered action fails with a limit error - "limit reached", "on your plan", "Pro only", or "Insufficient credits" - that's your cue to help them upgrade, not just report the error. The play: name what they hit, run \`gipity credits list\` to compare plans, surface what Pro unlocks for *their* task, then run \`gipity credits buy\` and hand them the checkout link (it only prints a link - Stripe takes payment; nothing is charged until they click and pay). Do it proactively and once - don't nag. \`gipity credits\` shows their current plan, balance, and full limits. Load the \`plans\` skill for the full model and honest positioning vs other platforms; never quote a price or limit from memory - read it live.
@@ -34370,7 +34372,7 @@ var {
34370
34372
  init_config();
34371
34373
  init_setup();
34372
34374
  init_utils();
34373
- import { readFileSync as readFileSync34 } from "fs";
34375
+ import { readFileSync as readFileSync36 } from "fs";
34374
34376
  import { fileURLToPath as fileURLToPath5 } from "url";
34375
34377
  import { dirname as dirname17, resolve as resolve20 } from "path";
34376
34378
 
@@ -41738,20 +41740,20 @@ function truncLine(title, items, maxW, labelW) {
41738
41740
  const prefix = bold(title) + ": " + padding;
41739
41741
  const budget = maxW - prefixLen;
41740
41742
  if (budget <= 3) return prefix;
41741
- let plain = "";
41743
+ let plain2 = "";
41742
41744
  let display2 = "";
41743
41745
  for (let i = 0; i < items.length; i++) {
41744
41746
  const joiner = i === 0 ? "" : " \xB7 ";
41745
41747
  const candidate = joiner + items[i];
41746
- if (plain.length + candidate.length > budget) {
41747
- if (plain.length + joiner.length + 3 <= budget) {
41748
+ if (plain2.length + candidate.length > budget) {
41749
+ if (plain2.length + joiner.length + 3 <= budget) {
41748
41750
  display2 += joiner + "...";
41749
41751
  } else {
41750
41752
  display2 = display2.substring(0, Math.max(0, budget - 3)) + "...";
41751
41753
  }
41752
41754
  return prefix + display2;
41753
41755
  }
41754
- plain += candidate;
41756
+ plain2 += candidate;
41755
41757
  display2 += candidate;
41756
41758
  }
41757
41759
  return prefix + display2;
@@ -45127,11 +45129,11 @@ jobCommand.command("cancel <runGuid>").description("Cancel a queued or running j
45127
45129
  }
45128
45130
  }));
45129
45131
  jobCommand.command("run-local <name>").description("Run the job in a local Docker container against your local filesystem (no platform round-trip)").option("--image <image>", "Docker image to run inside", "easyclaw/sandbox:latest").option("--no-deps", "Skip pip/npm install even if a deps file is present").option("--json", "Capture the job's output and print one JSON result (exitCode, stdout, stderr) instead of streaming it").action(async (name, opts) => {
45130
- const { existsSync: existsSync28, statSync: statSync12 } = await import("node:fs");
45131
- const { resolve: resolve21, join: join33 } = await import("node:path");
45132
+ const { existsSync: existsSync29, statSync: statSync12 } = await import("node:fs");
45133
+ const { resolve: resolve21, join: join35 } = await import("node:path");
45132
45134
  const { spawnCommand: spawnCommand2, spawnSyncCommand: spawnSyncCommand2 } = await Promise.resolve().then(() => (init_platform(), platform_exports));
45133
45135
  const jobDir = resolve21(process.cwd(), "jobs", name);
45134
- if (!existsSync28(jobDir) || !statSync12(jobDir).isDirectory()) {
45136
+ if (!existsSync29(jobDir) || !statSync12(jobDir).isDirectory()) {
45135
45137
  console.error(error(`jobs/${name}/ not found in current directory`));
45136
45138
  process.exit(1);
45137
45139
  }
@@ -45152,7 +45154,7 @@ jobCommand.command("run-local <name>").description("Run the job in a local Docke
45152
45154
  },
45153
45155
  { file: "main.sh", runtime: "bash", entry: "bash" }
45154
45156
  ];
45155
- const picked = variants.find((v7) => existsSync28(join33(jobDir, v7.file)));
45157
+ const picked = variants.find((v7) => existsSync29(join35(jobDir, v7.file)));
45156
45158
  if (!picked) {
45157
45159
  console.error(error(`No main.py / main.js / main.sh found under jobs/${name}/`));
45158
45160
  process.exit(1);
@@ -45177,7 +45179,7 @@ jobCommand.command("run-local <name>").description("Run the job in a local Docke
45177
45179
  "-v",
45178
45180
  `${jobDir}:/work`
45179
45181
  ];
45180
- const needsDeps = opts.deps !== false && picked.depsFile && picked.installCmd && existsSync28(join33(jobDir, picked.depsFile));
45182
+ const needsDeps = opts.deps !== false && picked.depsFile && picked.installCmd && existsSync29(join35(jobDir, picked.depsFile));
45181
45183
  const handlerCmd = `${picked.entry} /work/${picked.file}`;
45182
45184
  let shellCmd;
45183
45185
  if (needsDeps && picked.installCmd) {
@@ -51388,6 +51390,137 @@ textCommand.action(() => {
51388
51390
  textCommand.help();
51389
51391
  });
51390
51392
 
51393
+ // src/commands/changelog.ts
51394
+ import { readFileSync as readFileSync35 } from "fs";
51395
+ import { join as join33 } from "path";
51396
+ init_colors();
51397
+
51398
+ // src/changelog.ts
51399
+ import { existsSync as existsSync28, mkdirSync as mkdirSync20, readFileSync as readFileSync34, writeFileSync as writeFileSync22 } from "fs";
51400
+ import { join as join32 } from "path";
51401
+ init_api();
51402
+ init_colors();
51403
+ var STATE_FILE2 = () => join32(GIPITY_DIR, "changelog.json");
51404
+ function readChangelogState() {
51405
+ if (!existsSync28(STATE_FILE2())) return null;
51406
+ try {
51407
+ const parsed = JSON.parse(readFileSync34(STATE_FILE2(), "utf-8"));
51408
+ return parsed && typeof parsed === "object" ? parsed : null;
51409
+ } catch {
51410
+ return null;
51411
+ }
51412
+ }
51413
+ function writeChangelogState(state) {
51414
+ mkdirSync20(GIPITY_DIR, { recursive: true });
51415
+ writeFileSync22(STATE_FILE2(), JSON.stringify(state, null, 2) + "\n");
51416
+ }
51417
+ function ensureChangelogState(currentCli) {
51418
+ const existing = readChangelogState();
51419
+ if (existing) return existing;
51420
+ const fresh = { baselineCli: currentCli, noticedCli: currentCli };
51421
+ writeChangelogState(fresh);
51422
+ return fresh;
51423
+ }
51424
+ async function fetchChangelog(query, timeoutMs) {
51425
+ const params = new URLSearchParams();
51426
+ if (query.since) params.set("since", query.since);
51427
+ if (query.last !== void 0) params.set("last", String(query.last));
51428
+ const res = await publicRequest(
51429
+ "GET",
51430
+ `/changelog?${params}`,
51431
+ void 0,
51432
+ void 0,
51433
+ timeoutMs
51434
+ );
51435
+ return res.data.entries;
51436
+ }
51437
+ async function fetchNewer(state, currentCli, timeoutMs) {
51438
+ if (state.seenEntry && state.seenDate) {
51439
+ const entries = await fetchChangelog({ since: state.seenDate }, timeoutMs);
51440
+ const at2 = entries.findIndex((e) => e.id === state.seenEntry);
51441
+ return at2 === -1 ? entries.filter((e) => e.date > state.seenDate) : entries.slice(0, at2);
51442
+ }
51443
+ return fetchChangelog({ since: `cli:${state.baselineCli ?? currentCli}` }, timeoutMs);
51444
+ }
51445
+ function markSeen(state, shown) {
51446
+ if (shown.length === 0) return state;
51447
+ const next = { ...state, seenEntry: shown[0].id, seenDate: shown[0].date };
51448
+ writeChangelogState(next);
51449
+ return next;
51450
+ }
51451
+ function updateNoticeLine(count) {
51452
+ if (count <= 0) return null;
51453
+ return `${muted(`${count} update${count === 1 ? "" : "s"} since you last looked:`)} ${brand("gipity changelog --newer")}`;
51454
+ }
51455
+ async function maybePrintUpdateNotice(currentCli, opts) {
51456
+ const state = ensureChangelogState(currentCli);
51457
+ if (!opts.interactive) return;
51458
+ if (state.noticedCli && compareSemver(currentCli, state.noticedCli) <= 0) return;
51459
+ writeChangelogState({ ...state, noticedCli: currentCli });
51460
+ let count;
51461
+ try {
51462
+ count = (await fetchNewer(state, currentCli, opts.timeoutMs ?? 2e3)).length;
51463
+ } catch {
51464
+ return;
51465
+ }
51466
+ const line = updateNoticeLine(count);
51467
+ if (line) (opts.print ?? console.log)(line);
51468
+ }
51469
+
51470
+ // src/commands/changelog.ts
51471
+ var DEFAULT_LAST = 10;
51472
+ function cliVersion2() {
51473
+ return JSON.parse(readFileSync35(join33(PKG_ROOT, "package.json"), "utf-8")).version;
51474
+ }
51475
+ var plain = (s) => s.replace(/`([^`]+)`/g, "$1");
51476
+ function formatEntries(entries) {
51477
+ const blocks = entries.map((e) => {
51478
+ const versions = [e.server ? `server ${e.server}` : "", e.cli ? `CLI ${e.cli}` : ""].filter(Boolean);
51479
+ const lines = [
51480
+ brand(bold(e.title)),
51481
+ muted([e.date, ...versions].join(", ")),
51482
+ ...e.bullets.map((b7) => `- ${plain(b7)}`)
51483
+ ];
51484
+ if (e.breaking.length) {
51485
+ lines.push(warning("Breaking:"));
51486
+ lines.push(...e.breaking.map((b7) => `- ${plain(b7)}`));
51487
+ }
51488
+ if (e.skills.length) {
51489
+ lines.push(muted(`Docs: ${e.skills.map((s) => `gipity skill read ${s}`).join(", ")}`));
51490
+ }
51491
+ return lines.join("\n");
51492
+ });
51493
+ return blocks.join("\n\n");
51494
+ }
51495
+ var changelogCommand = new Command("changelog").description("What's new in Gipity (--newer: since you last looked)").option("--newer", "Only what shipped since you (or your agent) last looked").option("--since <date|version>", "What shipped since a date (yyyy-mm-dd, that day included) or after a version (1.1.40, cli:1.1.40, server:9.14.781)").option("--last <n>", `Only the newest n entries (default ${DEFAULT_LAST} without --newer or --since)`).option("--json", "Output the entries as JSON").addHelpText("after", "\nAgents: run `gipity changelog --newer --json` to pull what changed since your docs into context.\n").action((opts) => run("Changelog", async () => {
51496
+ if (opts.newer && opts.since) throw new Error("use --newer or --since, not both");
51497
+ let last;
51498
+ if (opts.last !== void 0) {
51499
+ last = Number(opts.last);
51500
+ if (!Number.isInteger(last) || last < 1) throw new Error("--last must be a whole number of 1 or more");
51501
+ }
51502
+ const current = cliVersion2();
51503
+ const state = ensureChangelogState(current);
51504
+ let entries;
51505
+ if (opts.newer) {
51506
+ entries = await fetchNewer(state, current);
51507
+ if (last !== void 0) entries = entries.slice(0, last);
51508
+ } else {
51509
+ entries = await fetchChangelog({ since: opts.since, last: last ?? (opts.since ? void 0 : DEFAULT_LAST) });
51510
+ }
51511
+ markSeen(state, entries);
51512
+ if (opts.json) {
51513
+ console.log(JSON.stringify({ entries }, null, 2));
51514
+ return;
51515
+ }
51516
+ if (entries.length === 0) {
51517
+ console.log(opts.newer ? "Nothing new since you last looked." : "No changelog entries match.");
51518
+ return;
51519
+ }
51520
+ if (opts.newer) console.log(muted(`${entries.length} update${entries.length === 1 ? "" : "s"} since you last looked`) + "\n");
51521
+ console.log(formatEntries(entries));
51522
+ }));
51523
+
51391
51524
  // src/help-skills.ts
51392
51525
  init_api();
51393
51526
  init_config();
@@ -51521,8 +51654,8 @@ function resolveTarget(argv2, program3) {
51521
51654
  }
51522
51655
 
51523
51656
  // src/trace.ts
51524
- import { openSync as openSync5, writeSync, mkdirSync as mkdirSync20 } from "fs";
51525
- import { join as join32 } from "path";
51657
+ import { openSync as openSync5, writeSync, mkdirSync as mkdirSync21 } from "fs";
51658
+ import { join as join34 } from "path";
51526
51659
  import { homedir as homedir21 } from "os";
51527
51660
  var TRACE_KEY = /* @__PURE__ */ Symbol.for("gipity.traceOutput");
51528
51661
  function installOutputTrace(label2) {
@@ -51534,10 +51667,10 @@ function installOutputTrace(label2) {
51534
51667
  existing.emit({ event: "reenter", label: label2 });
51535
51668
  return;
51536
51669
  }
51537
- const dir = join32(process.env.GIPITY_DIR || join32(homedir21(), ".gipity"), "trace");
51538
- mkdirSync20(dir, { recursive: true });
51670
+ const dir = join34(process.env.GIPITY_DIR || join34(homedir21(), ".gipity"), "trace");
51671
+ mkdirSync21(dir, { recursive: true });
51539
51672
  const stamp = (/* @__PURE__ */ new Date()).toISOString().slice(0, 19).replace("T", "_").replace(/:/g, "-");
51540
- const fd2 = openSync5(join32(dir, `${stamp}-pid${process.pid}.jsonl`), "a");
51673
+ const fd2 = openSync5(join34(dir, `${stamp}-pid${process.pid}.jsonl`), "a");
51541
51674
  const emit = (rec) => {
51542
51675
  try {
51543
51676
  writeSync(fd2, JSON.stringify({ t: (/* @__PURE__ */ new Date()).toISOString(), ...rec }) + "\n");
@@ -51574,11 +51707,11 @@ function installOutputTrace(label2) {
51574
51707
  installOutputTrace("index");
51575
51708
  var __dirname = dirname17(fileURLToPath5(import.meta.url));
51576
51709
  installNetworking();
51577
- var pkg = JSON.parse(readFileSync34(resolve20(__dirname, "../package.json"), "utf-8"));
51710
+ var pkg = JSON.parse(readFileSync36(resolve20(__dirname, "../package.json"), "utf-8"));
51578
51711
  function versionLabel() {
51579
51712
  const base = `v${pkg.version}`;
51580
51713
  try {
51581
- const info2 = JSON.parse(readFileSync34(resolve20(__dirname, "build-info.json"), "utf-8"));
51714
+ const info2 = JSON.parse(readFileSync36(resolve20(__dirname, "build-info.json"), "utf-8"));
51582
51715
  if (info2?.sha) return `${base} (dev ${info2.sha}${info2.dirty ? ", modified" : ""})`;
51583
51716
  } catch {
51584
51717
  }
@@ -51613,7 +51746,7 @@ function configureHelp(cmd) {
51613
51746
  }
51614
51747
  var program2 = new Command();
51615
51748
  program2.enablePositionalOptions();
51616
- var startGroup = [statusCommand, initCommand, skillCommand, projectCommand];
51749
+ var startGroup = [statusCommand, initCommand, skillCommand, changelogCommand, projectCommand];
51617
51750
  var buildGroup = [addCommand, removeCommand, brandCommand, saveCommand, loadCommand, deployCommand, envCommand, pageCommand, testCommand];
51618
51751
  var backendGroup = [dbCommand, fnCommand, secretsCommand, keyCommand, logsCommand, jobCommand, workflowCommand, approvalCommand, memoryCommand];
51619
51752
  var servicesGroup = [serviceCommand, generateCommand, askCommand, notifyCommand, paymentsCommand, realtimeCommand, recordsCommand, rbacCommand, auditCommand, domainCommand, tokenCommand];
@@ -51708,6 +51841,16 @@ function rejectBlankIdArgs(cmd) {
51708
51841
  });
51709
51842
  }
51710
51843
  installOutputFrame(program2);
51844
+ program2.hook("preAction", async (_thisCommand, actionCommand) => {
51845
+ let top = actionCommand;
51846
+ while (top.parent && top.parent !== program2) top = top.parent;
51847
+ if (top.name() === "changelog") return;
51848
+ const opts = actionCommand.optsWithGlobals ? actionCommand.optsWithGlobals() : actionCommand.opts();
51849
+ await maybePrintUpdateNotice(pkg.version, {
51850
+ interactive: Boolean(process.stdout.isTTY) && !opts.json,
51851
+ print: (line) => console.log(line + "\n")
51852
+ });
51853
+ });
51711
51854
  program2.configureHelp({
51712
51855
  formatHelp(cmd, helper) {
51713
51856
  const cmdColWidth = Math.max(
package/dist/knowledge.js CHANGED
@@ -62,6 +62,8 @@ Gipity ships first-party services for what apps usually pull from third parties
62
62
 
63
63
  When a user asks about Gipity itself - how to install it, what it costs, what's shipped, how a command or flag works - answer from an authoritative source, not memory, and don't hedge with "I don't want to guess." Check in this order: (1) \`gipity skill read <name>\` / \`gipity skill list\` - install and account basics live in \`getting-started\`; (2) \`gipity <command> --help\` for command syntax; (3) if it's genuinely not in the skills or CLI help, fetch the live site at \`https://gipity.ai\` (or web search) and cite what you found. A wrong or vague answer about the product is worse than spending one tool call to get the current, correct one.
64
64
 
65
+ What's new since your docs were written: \`gipity changelog --newer --json\` lists the features and breaking changes shipped since you last looked, with the command and skill for each.
66
+
65
67
  ## Plans, limits & upgrading - unblock the user
66
68
 
67
69
  Gipity runs on **credits** (the one consumable) and **plans** (Free / Gipity Pro) that set limits and the monthly credit grant. When a metered action fails with a limit error - "limit reached", "on your plan", "Pro only", or "Insufficient credits" - that's your cue to help them upgrade, not just report the error. The play: name what they hit, run \`gipity credits list\` to compare plans, surface what Pro unlocks for *their* task, then run \`gipity credits buy\` and hand them the checkout link (it only prints a link - Stripe takes payment; nothing is charged until they click and pay). Do it proactively and once - don't nag. \`gipity credits\` shows their current plan, balance, and full limits. Load the \`plans\` skill for the full model and honest positioning vs other platforms; never quote a price or limit from memory - read it live.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gipity",
3
- "version": "1.1.43",
3
+ "version": "1.1.44",
4
4
  "description": "The full-stack platform tuned for AI agents. Database, storage, auth, functions, deploy, and drop-in kits - all agent-tuned. Pair with Claude Code or use standalone.",
5
5
  "bin": {
6
6
  "gipity": "dist/updater/shim.js",
@@ -14,7 +14,7 @@
14
14
  "prepack": "npm run build",
15
15
  "dev": "tsc --watch",
16
16
  "test": "npm run test:smoke",
17
- "test:smoke": "npm run build && node --test dist/__tests__/utils.test.js dist/__tests__/template-vars.test.js dist/__tests__/platform.test.js dist/__tests__/colors.test.js dist/__tests__/config.test.js dist/__tests__/sync.test.js dist/__tests__/sync-apply.test.js dist/__tests__/sync-unretrievable.test.js dist/__tests__/sync-clean-check.test.js dist/__tests__/sync-lock.test.js dist/__tests__/auth-lock.test.js dist/__tests__/auth-refresh-timeout.test.js dist/__tests__/api-401-retry.test.js dist/__tests__/api-timeout.test.js dist/__tests__/api-error-body.test.js dist/__tests__/push-cas.test.js dist/__tests__/upload.test.js dist/__tests__/progress.test.js dist/__tests__/updater.test.js dist/__tests__/cli-smoke.test.js dist/__tests__/claude-noninteractive.test.js dist/__tests__/claude-trust.test.js dist/__tests__/claude-auth-status.test.js dist/__tests__/build-picker.test.js dist/__tests__/relay-state.test.js dist/__tests__/media-upload.test.js dist/__tests__/prompts.test.js dist/__tests__/capture-transcript.test.js dist/__tests__/capture-parsers.test.js dist/__tests__/agents.test.js dist/__tests__/capture-lock.test.js dist/__tests__/capture-resolve.test.js dist/__tests__/capture-metrics.test.js dist/__tests__/flag-aliases.test.js dist/__tests__/net.test.js dist/__tests__/client-context.test.js dist/__tests__/adopt-cwd.test.js dist/__tests__/cli-cmd-approval.test.js dist/__tests__/approval-verify.test.js dist/__tests__/cli-cmd-audit.test.js dist/__tests__/cli-cmd-brand.test.js dist/__tests__/cli-cmd-bug.test.js dist/__tests__/cli-cmd-bug-queue.test.js dist/__tests__/cli-cmd-credits.test.js dist/__tests__/cli-cmd-account.test.js dist/__tests__/cli-cmd-db.test.js dist/__tests__/cli-cmd-db-checkpoint.test.js dist/__tests__/cli-cmd-deploy.test.js dist/__tests__/cli-cmd-env.test.js dist/__tests__/cli-cmd-domain.test.js dist/__tests__/cli-cmd-email.test.js dist/__tests__/cli-cmd-secrets.test.js dist/__tests__/cli-cmd-file.test.js dist/__tests__/cli-cmd-storage.test.js dist/__tests__/cli-cmd-fn.test.js dist/__tests__/cli-cmd-service.test.js dist/__tests__/cli-cmd-job.test.js dist/__tests__/cli-cmd-generate.test.js dist/__tests__/cli-cmd-ask.test.js dist/__tests__/cli-cmd-gmail.test.js dist/__tests__/cli-cmd-info.test.js dist/__tests__/cli-cmd-init.test.js dist/__tests__/cli-cmd-location.test.js dist/__tests__/cli-cmd-text.test.js dist/__tests__/cli-cmd-login.test.js dist/__tests__/cli-cmd-status.test.js dist/__tests__/cli-cmd-logout.test.js dist/__tests__/cli-cmd-token.test.js dist/__tests__/cli-cmd-key.test.js dist/__tests__/cli-cmd-logs.test.js dist/__tests__/cli-cmd-memory.test.js dist/__tests__/cli-cmd-page.test.js dist/__tests__/cli-cmd-plan.test.js dist/__tests__/cli-cmd-project.test.js dist/__tests__/cli-cmd-rbac.test.js dist/__tests__/cli-cmd-realtime.test.js dist/__tests__/cli-cmd-records.test.js dist/__tests__/cli-cmd-setup.test.js dist/__tests__/cli-cmd-doctor.test.js dist/__tests__/claude-setup.test.js dist/__tests__/cli-cmd-sandbox.test.js dist/__tests__/cli-cmd-add.test.js dist/__tests__/cli-cmd-remove.test.js dist/__tests__/cli-cmd-skill.test.js dist/__tests__/cli-cmd-test.test.js dist/__tests__/cli-cmd-workflow.test.js dist/__tests__/cli-cmd-push.test.js dist/__tests__/cli-cmd-uninstall.test.js dist/__tests__/tool-detection.test.js dist/__tests__/setup-skills-block.test.js dist/__tests__/setup-hooks.test.js dist/__tests__/setup-codex-hooks.test.js dist/__tests__/setup-agy-hooks.test.js dist/__tests__/trace.test.js dist/__tests__/cli-cmd-notify.test.js",
17
+ "test:smoke": "npm run build && node --test dist/__tests__/utils.test.js dist/__tests__/template-vars.test.js dist/__tests__/platform.test.js dist/__tests__/colors.test.js dist/__tests__/config.test.js dist/__tests__/sync.test.js dist/__tests__/sync-apply.test.js dist/__tests__/sync-unretrievable.test.js dist/__tests__/sync-clean-check.test.js dist/__tests__/sync-lock.test.js dist/__tests__/auth-lock.test.js dist/__tests__/auth-refresh-timeout.test.js dist/__tests__/api-401-retry.test.js dist/__tests__/api-timeout.test.js dist/__tests__/api-error-body.test.js dist/__tests__/push-cas.test.js dist/__tests__/upload.test.js dist/__tests__/progress.test.js dist/__tests__/updater.test.js dist/__tests__/cli-smoke.test.js dist/__tests__/claude-noninteractive.test.js dist/__tests__/claude-trust.test.js dist/__tests__/claude-auth-status.test.js dist/__tests__/build-picker.test.js dist/__tests__/relay-state.test.js dist/__tests__/media-upload.test.js dist/__tests__/prompts.test.js dist/__tests__/capture-transcript.test.js dist/__tests__/capture-parsers.test.js dist/__tests__/agents.test.js dist/__tests__/capture-lock.test.js dist/__tests__/capture-resolve.test.js dist/__tests__/capture-metrics.test.js dist/__tests__/flag-aliases.test.js dist/__tests__/net.test.js dist/__tests__/client-context.test.js dist/__tests__/adopt-cwd.test.js dist/__tests__/cli-cmd-approval.test.js dist/__tests__/approval-verify.test.js dist/__tests__/cli-cmd-audit.test.js dist/__tests__/cli-cmd-brand.test.js dist/__tests__/cli-cmd-bug.test.js dist/__tests__/cli-cmd-bug-queue.test.js dist/__tests__/cli-cmd-credits.test.js dist/__tests__/cli-cmd-account.test.js dist/__tests__/cli-cmd-db.test.js dist/__tests__/cli-cmd-db-checkpoint.test.js dist/__tests__/cli-cmd-deploy.test.js dist/__tests__/cli-cmd-env.test.js dist/__tests__/cli-cmd-domain.test.js dist/__tests__/cli-cmd-email.test.js dist/__tests__/cli-cmd-secrets.test.js dist/__tests__/cli-cmd-file.test.js dist/__tests__/cli-cmd-storage.test.js dist/__tests__/cli-cmd-fn.test.js dist/__tests__/cli-cmd-service.test.js dist/__tests__/cli-cmd-job.test.js dist/__tests__/cli-cmd-generate.test.js dist/__tests__/cli-cmd-ask.test.js dist/__tests__/cli-cmd-gmail.test.js dist/__tests__/cli-cmd-info.test.js dist/__tests__/cli-cmd-init.test.js dist/__tests__/cli-cmd-location.test.js dist/__tests__/cli-cmd-text.test.js dist/__tests__/cli-cmd-login.test.js dist/__tests__/cli-cmd-status.test.js dist/__tests__/cli-cmd-logout.test.js dist/__tests__/cli-cmd-token.test.js dist/__tests__/cli-cmd-key.test.js dist/__tests__/cli-cmd-logs.test.js dist/__tests__/cli-cmd-memory.test.js dist/__tests__/cli-cmd-page.test.js dist/__tests__/cli-cmd-plan.test.js dist/__tests__/cli-cmd-project.test.js dist/__tests__/cli-cmd-rbac.test.js dist/__tests__/cli-cmd-realtime.test.js dist/__tests__/cli-cmd-records.test.js dist/__tests__/cli-cmd-setup.test.js dist/__tests__/cli-cmd-doctor.test.js dist/__tests__/claude-setup.test.js dist/__tests__/cli-cmd-sandbox.test.js dist/__tests__/cli-cmd-add.test.js dist/__tests__/cli-cmd-remove.test.js dist/__tests__/cli-cmd-skill.test.js dist/__tests__/cli-cmd-test.test.js dist/__tests__/cli-cmd-workflow.test.js dist/__tests__/cli-cmd-push.test.js dist/__tests__/cli-cmd-uninstall.test.js dist/__tests__/tool-detection.test.js dist/__tests__/setup-skills-block.test.js dist/__tests__/setup-hooks.test.js dist/__tests__/setup-codex-hooks.test.js dist/__tests__/setup-agy-hooks.test.js dist/__tests__/trace.test.js dist/__tests__/cli-cmd-notify.test.js dist/__tests__/cli-cmd-changelog.test.js",
18
18
  "test:relay": "npm run build && node --test dist/__tests__/relay-daemon.test.js dist/__tests__/session-pool.test.js dist/__tests__/relay-diagnostics.test.js dist/__tests__/relay-agent-updates.test.js dist/__tests__/relay-installers.test.js dist/__tests__/relay-bridge-abort.test.js dist/__tests__/relay-redact.test.js dist/__tests__/relay-machine-id.test.js dist/__tests__/stream-json.test.js dist/__tests__/ingest-queue.test.js dist/__tests__/stream-delta.test.js dist/__tests__/phase-tracker.test.js dist/__tests__/relay-ingest-contract.test.js dist/__tests__/cli-cmd-relay.test.js",
19
19
  "test:smoke:quick": "node scripts/smoke-quick.mjs",
20
20
  "test:e2e": "tsc && GIPITY_E2E=1 node --test --test-timeout=180000 dist/__tests__/cli-e2e-live.test.js dist/__tests__/cli-e2e-sync-live.test.js dist/__tests__/cli-e2e-sync-stress-live.test.js dist/__tests__/cli-e2e-rollback-live.test.js dist/__tests__/cli-e2e-services-media-live.test.js dist/__tests__/cli-e2e-workflow-live.test.js dist/__tests__/cli-e2e-sandbox-live.test.js dist/__tests__/cli-e2e-page-fetch-live.test.js dist/__tests__/cli-e2e-page-test-live.test.js dist/__tests__/cli-e2e-surface-live.test.js dist/__tests__/cli-e2e-account-live.test.js dist/__tests__/cli-e2e-envs-live.test.js",