postgresai 0.16.0-dev.7 → 0.16.0-dev.8

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.
@@ -5647,6 +5647,22 @@ withJoeOptions(
5647
5647
  await runJoeCli("describe", null, args, opts);
5648
5648
  });
5649
5649
 
5650
+ // history search is roadmapped for M1b; the search backend is not deployed yet.
5651
+ // Ship a recognized subcommand so the documented `pgai joe history …` example
5652
+ // degrades cleanly (an informative "not yet available" line + exit 1) instead of
5653
+ // Commander's generic "unknown command 'history'". Wire it to the rpc when M1b lands.
5654
+ withJoeOptions(
5655
+ joe
5656
+ .command("history <terms>")
5657
+ .description("search prior Joe analyses, metadata-only (M1b — not yet available)")
5658
+ ).action(async (_terms: string, _opts: JoeCliOpts) => {
5659
+ console.error(
5660
+ "Joe history search is not available yet — it is planned for M1b. " +
5661
+ "No history-search backend is deployed; this command is a placeholder until then.",
5662
+ );
5663
+ process.exitCode = 1;
5664
+ });
5665
+
5650
5666
  // Org-level discovery — a general postgresai command, NOT a Joe endpoint (SPEC §6).
5651
5667
  program
5652
5668
  .command("projects")
@@ -13444,7 +13444,7 @@ var {
13444
13444
  // package.json
13445
13445
  var package_default = {
13446
13446
  name: "postgresai",
13447
- version: "0.16.0-dev.7",
13447
+ version: "0.16.0-dev.8",
13448
13448
  description: "postgres_ai CLI",
13449
13449
  license: "Apache-2.0",
13450
13450
  private: false,
@@ -16275,7 +16275,7 @@ var Result = import_lib.default.Result;
16275
16275
  var TypeOverrides = import_lib.default.TypeOverrides;
16276
16276
  var defaults = import_lib.default.defaults;
16277
16277
  // package.json
16278
- var version = "0.16.0-dev.7";
16278
+ var version = "0.16.0-dev.8";
16279
16279
  var package_default2 = {
16280
16280
  name: "postgresai",
16281
16281
  version,
@@ -39856,6 +39856,10 @@ withJoeOptions(joe.command("describe <object>").description("\\d-family schema/r
39856
39856
  args.variant = opts.variant;
39857
39857
  await runJoeCli("describe", null, args, opts);
39858
39858
  });
39859
+ withJoeOptions(joe.command("history <terms>").description("search prior Joe analyses, metadata-only (M1b \u2014 not yet available)")).action(async (_terms, _opts) => {
39860
+ console.error("Joe history search is not available yet \u2014 it is planned for M1b. " + "No history-search backend is deployed; this command is a placeholder until then.");
39861
+ process.exitCode = 1;
39862
+ });
39859
39863
  program2.command("projects").description("list the org's projects (shows which have Joe ready) \u2014 org-level, not a Joe endpoint").option("--debug", "enable debug output").option("--json", "output raw JSON").action(async (opts) => {
39860
39864
  try {
39861
39865
  const rootOpts = program2.opts();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "postgresai",
3
- "version": "0.16.0-dev.7",
3
+ "version": "0.16.0-dev.8",
4
4
  "description": "postgres_ai CLI",
5
5
  "license": "Apache-2.0",
6
6
  "private": false,
@@ -141,11 +141,23 @@ describe("CLI Joe command surface (grouped under `pgai joe …`)", () => {
141
141
  const r = runCli(["joe", "--help"], isolatedEnv());
142
142
  expect(r.status).toBe(0);
143
143
  const out = `${r.stdout}\n${r.stderr}`;
144
- for (const verb of ["plan", "explain", "exec", "hypo", "activity", "terminate", "reset", "describe", "result", "status"]) {
144
+ for (const verb of ["plan", "explain", "exec", "hypo", "activity", "terminate", "reset", "describe", "result", "status", "history"]) {
145
145
  expect(out).toContain(verb);
146
146
  }
147
147
  });
148
148
 
149
+ test("pgai joe history (M1b) is recognized and degrades cleanly", () => {
150
+ // The brief's §2 documents `pgai joe history "users email" --project 12`, but the
151
+ // history-search backend is M1b/not built. The command must be recognized (NOT a
152
+ // Commander "unknown command") and exit 1 with an informative pending message.
153
+ const r = runCli(["joe", "history", "users email", "--project", "12"], isolatedEnv({ PGAI_API_KEY: "k" }));
154
+ expect(r.status).toBe(1);
155
+ const out = `${r.stdout}\n${r.stderr}`;
156
+ expect(out).toContain("not available yet");
157
+ expect(out).toContain("M1b");
158
+ expect(out).not.toContain("unknown command");
159
+ });
160
+
149
161
  test("pgai projects prints the brief's table", async () => {
150
162
  const api = startFakeApi();
151
163
  try {