orbit-code-ai 0.1.32 → 0.1.33

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/cli.mjs +69 -12
  2. package/package.json +1 -1
package/dist/cli.mjs CHANGED
@@ -83759,7 +83759,7 @@ async function printStartupScreen() {
83759
83759
  const sLen = ` ● ${sL} Ready — type /help to begin`.length;
83760
83760
  out.push(boxRow(sRow, W2, sLen));
83761
83761
  out.push(`${rgb(...BORDER)}╚${"═".repeat(W2 - 2)}╝${RESET}`);
83762
- out.push(` ${DIM}${rgb(...DIMCOL)}orbit-code ${RESET}${rgb(...ACCENT)}v${"0.1.32"}${RESET}`);
83762
+ out.push(` ${DIM}${rgb(...DIMCOL)}orbit-code ${RESET}${rgb(...ACCENT)}v${"0.1.33"}${RESET}`);
83763
83763
  out.push("");
83764
83764
  process.stdout.write(out.join(`
83765
83765
  `) + `
@@ -334266,7 +334266,7 @@ function getAnthropicEnvMetadata() {
334266
334266
  function getBuildAgeMinutes() {
334267
334267
  if (false)
334268
334268
  ;
334269
- const buildTime = new Date("2026-07-01T07:48:45.761Z").getTime();
334269
+ const buildTime = new Date("2026-07-01T08:00:15.087Z").getTime();
334270
334270
  if (isNaN(buildTime))
334271
334271
  return;
334272
334272
  return Math.floor((Date.now() - buildTime) / 60000);
@@ -358683,7 +358683,7 @@ function buildPrimarySection() {
358683
358683
  }, undefined, false, undefined, this);
358684
358684
  return [{
358685
358685
  label: "Version",
358686
- value: "0.1.32"
358686
+ value: "0.1.33"
358687
358687
  }, {
358688
358688
  label: "Session name",
358689
358689
  value: nameValue
@@ -470794,7 +470794,7 @@ function WelcomeV2() {
470794
470794
  dimColor: true,
470795
470795
  children: [
470796
470796
  "v",
470797
- "0.1.32",
470797
+ "0.1.33",
470798
470798
  " "
470799
470799
  ]
470800
470800
  }, undefined, true, undefined, this)
@@ -470994,7 +470994,7 @@ function WelcomeV2() {
470994
470994
  dimColor: true,
470995
470995
  children: [
470996
470996
  "v",
470997
- "0.1.32",
470997
+ "0.1.33",
470998
470998
  " "
470999
470999
  ]
471000
471000
  }, undefined, true, undefined, this)
@@ -471220,7 +471220,7 @@ function AppleTerminalWelcomeV2(t0) {
471220
471220
  dimColor: true,
471221
471221
  children: [
471222
471222
  "v",
471223
- "0.1.32",
471223
+ "0.1.33",
471224
471224
  " "
471225
471225
  ]
471226
471226
  }, undefined, true, undefined, this);
@@ -471474,7 +471474,7 @@ function AppleTerminalWelcomeV2(t0) {
471474
471474
  dimColor: true,
471475
471475
  children: [
471476
471476
  "v",
471477
- "0.1.32",
471477
+ "0.1.33",
471478
471478
  " "
471479
471479
  ]
471480
471480
  }, undefined, true, undefined, this);
@@ -509980,6 +509980,11 @@ async function describeProcedure(conn, schema, name) {
509980
509980
  }
509981
509981
  return { schema, name, params, resultSet, resultSetUndescribable };
509982
509982
  }
509983
+ async function getProcedureDefinition(conn, schema, name) {
509984
+ const rows = await runQuery(conn, `SELECT OBJECT_DEFINITION(OBJECT_ID(@obj)) AS definition`, [{ name: "obj", type: "NVarChar", value: `${schema}.${name}` }]);
509985
+ const def2 = rows[0]?.definition;
509986
+ return def2 == null ? null : String(def2);
509987
+ }
509983
509988
  var init_spMetadata = __esm(() => {
509984
509989
  init_mssqlClient();
509985
509990
  });
@@ -510120,6 +510125,8 @@ function extractProcName(text) {
510120
510125
  }
510121
510126
  function inferIntent(text) {
510122
510127
  const t = text.toLowerCase();
510128
+ if (/\b(read|show|view|print|dump)\b.*\b(content|code|body|definition|source|logic|sql|proc|procedure|sp)\b/.test(t) || /\b(content|body|definition|source code|sql code|internal logic|the code|its logic|what it does inside|how it works)\b/.test(t))
510129
+ return "source";
510123
510130
  if (/\b(generate|gen|esql|call code|declaration|create the call)\b/.test(t))
510124
510131
  return "gen";
510125
510132
  if (/\b(verify|compare|matches?|used in|called in|cross[- ]?check)\b/.test(t))
@@ -510154,6 +510161,22 @@ ${params}
510154
510161
  First result set:
510155
510162
  ${cols}${GROUND}`;
510156
510163
  }
510164
+ async function runSource(conn, schema, name) {
510165
+ const def2 = await getProcedureDefinition(conn, schema, name);
510166
+ if (!def2) {
510167
+ return `Could not read the source of ${schema}.${name}. Either it does not exist, or it is defined WITH ENCRYPTION (OBJECT_DEFINITION returns NULL for encrypted procedures). Do not guess its contents — tell the user it is unavailable.`;
510168
+ }
510169
+ const MAX = 24000;
510170
+ const body = def2.length > MAX ? `${def2.slice(0, MAX)}
510171
+ -- …[truncated; ${def2.length} chars total]…` : def2;
510172
+ return `Actual T-SQL source of ${schema}.${name} (read live from the database):
510173
+
510174
+ \`\`\`sql
510175
+ ${body}
510176
+ \`\`\`
510177
+
510178
+ Answer the user's question using ONLY this real source above. To state exactly what the procedure returns, read its SELECT statement(s), OUTPUT parameters, and RETURN — do NOT rely on catalog "result set" metadata (that DMV reports "no result set" for procedures it cannot statically describe, e.g. dynamic SQL or temp tables). Never invent SQL that is not shown above.`;
510179
+ }
510157
510180
  async function runGen(conn, schema, name) {
510158
510181
  const sp = await describeProcedure(conn, schema, name);
510159
510182
  if (sp.params.length === 0 && sp.resultSet.length === 0 && !sp.resultSetUndescribable) {
@@ -510246,6 +510269,16 @@ Do NOT attempt to answer database questions — you have no connection or data.`
510246
510269
  return `Failed to describe ${restStr}: ${e2.message}`;
510247
510270
  }
510248
510271
  }
510272
+ if (firstTok === "source" || firstTok === "def" || firstTok === "definition" || firstTok === "body" || firstTok === "code") {
510273
+ if (!restStr)
510274
+ return "Usage: /sql source <schema.proc>";
510275
+ const { schema: schema2, name: name2 } = splitProc(restStr.split(/\s+/)[0]);
510276
+ try {
510277
+ return await runSource(conn, schema2, name2);
510278
+ } catch (e2) {
510279
+ return `Failed to read source of ${restStr}: ${e2.message}`;
510280
+ }
510281
+ }
510249
510282
  if (firstTok === "gen" || firstTok === "generate") {
510250
510283
  if (!restStr)
510251
510284
  return "Usage: /sql gen <schema.proc>";
@@ -510280,6 +510313,8 @@ Do NOT attempt to answer database questions — you have no connection or data.`
510280
510313
  }
510281
510314
  const { schema, name } = splitProc(procToken);
510282
510315
  try {
510316
+ if (intent === "source")
510317
+ return await runSource(conn, schema, name);
510283
510318
  if (intent === "gen")
510284
510319
  return await runGen(conn, schema, name);
510285
510320
  if (intent === "verify")
@@ -510313,7 +510348,8 @@ Subcommands (also understands plain English, e.g. "/sql details of the SP Get_Us
510313
510348
  - \`/sql status\` — show the saved connection (never the password).
510314
510349
  - \`/sql disconnect\` — forget the saved connection.
510315
510350
  - \`/sql procs [schema]\` — list stored procedures (default schema: dbo).
510316
- - \`/sql describe <schema.proc>\` — parameters (in/out) + first result set.
510351
+ - \`/sql describe <schema.proc>\` — parameters (in/out) + first result set (catalog metadata).
510352
+ - \`/sql source <schema.proc>\` — the actual T-SQL body of the procedure (read the real code).
510317
510353
  - \`/sql gen <schema.proc>\` — generate the ESQL PROCEDURE declaration + CALL.
510318
510354
  - \`/sql verify <schema.proc>\` — pull the real SP signature, then check how this project's ESQL calls it.
510319
510355
 
@@ -510371,7 +510407,28 @@ var init_sql = __esm(() => {
510371
510407
  "verify",
510372
510408
  "check",
510373
510409
  "describe",
510374
- "list"
510410
+ "list",
510411
+ "read",
510412
+ "content",
510413
+ "body",
510414
+ "code",
510415
+ "definition",
510416
+ "source",
510417
+ "logic",
510418
+ "returns",
510419
+ "return",
510420
+ "exactly",
510421
+ "tell",
510422
+ "does",
510423
+ "do",
510424
+ "it",
510425
+ "view",
510426
+ "print",
510427
+ "dump",
510428
+ "sql",
510429
+ "how",
510430
+ "works",
510431
+ "inside"
510375
510432
  ]);
510376
510433
  });
510377
510434
 
@@ -526955,7 +527012,7 @@ Usage: orbit --remote "your task description"`, () => gracefulShutdown(1));
526955
527012
  pendingHookMessages
526956
527013
  }, renderAndRun);
526957
527014
  }
526958
- }).version("0.1.32 (Orbit AI)", "-v, --version", "Output the version number");
527015
+ }).version("0.1.33 (Orbit AI)", "-v, --version", "Output the version number");
526959
527016
  program2.option("-w, --worktree [name]", "Create a new git worktree for this session (optionally specify a name)");
526960
527017
  program2.option("--tmux", "Create a tmux session for the worktree (requires --worktree). Uses iTerm2 native panes when available; use --tmux=classic for traditional tmux.");
526961
527018
  if (canUserConfigureAdvisor()) {
@@ -527477,7 +527534,7 @@ if (false) {}
527477
527534
  async function main2() {
527478
527535
  const args = process.argv.slice(2);
527479
527536
  if (args.length === 1 && (args[0] === "--version" || args[0] === "-v" || args[0] === "-V")) {
527480
- console.log(`${"0.1.32"} (Orbit AI)`);
527537
+ console.log(`${"0.1.33"} (Orbit AI)`);
527481
527538
  return;
527482
527539
  }
527483
527540
  if (args.includes("--provider")) {
@@ -527581,4 +527638,4 @@ async function main2() {
527581
527638
  }
527582
527639
  main2();
527583
527640
 
527584
- //# debugId=92EE15F2E0E86EDF64756E2164756E21
527641
+ //# debugId=DE14B935DE0448FB64756E2164756E21
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "orbit-code-ai",
3
- "version": "0.1.32",
3
+ "version": "0.1.33",
4
4
  "description": "Orbit AI – Your AI-powered IBM ACE coding companion",
5
5
  "type": "module",
6
6
  "author": "moenawaf",