orbit-code-ai 0.1.4 → 0.1.6

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 CHANGED
@@ -83712,7 +83712,7 @@ function printStartupScreen() {
83712
83712
  const sLen = ` ● ${sL} Ready — type /help to begin`.length;
83713
83713
  out.push(boxRow(sRow, W2, sLen));
83714
83714
  out.push(`${rgb(...BORDER)}╚${"═".repeat(W2 - 2)}╝${RESET}`);
83715
- out.push(` ${DIM}${rgb(...DIMCOL)}orbit-ai ${RESET}${rgb(...ACCENT)}v${"0.1.4"}${RESET}`);
83715
+ out.push(` ${DIM}${rgb(...DIMCOL)}orbit-ai ${RESET}${rgb(...ACCENT)}v${"0.1.6"}${RESET}`);
83716
83716
  out.push("");
83717
83717
  process.stdout.write(out.join(`
83718
83718
  `) + `
@@ -334183,7 +334183,7 @@ function getAnthropicEnvMetadata() {
334183
334183
  function getBuildAgeMinutes() {
334184
334184
  if (false)
334185
334185
  ;
334186
- const buildTime = new Date("2026-06-23T07:21:13.640Z").getTime();
334186
+ const buildTime = new Date("2026-06-23T11:43:54.224Z").getTime();
334187
334187
  if (isNaN(buildTime))
334188
334188
  return;
334189
334189
  return Math.floor((Date.now() - buildTime) / 60000);
@@ -358600,7 +358600,7 @@ function buildPrimarySection() {
358600
358600
  }, undefined, false, undefined, this);
358601
358601
  return [{
358602
358602
  label: "Version",
358603
- value: "0.1.4"
358603
+ value: "0.1.6"
358604
358604
  }, {
358605
358605
  label: "Session name",
358606
358606
  value: nameValue
@@ -470842,7 +470842,7 @@ function WelcomeV2() {
470842
470842
  dimColor: true,
470843
470843
  children: [
470844
470844
  "v",
470845
- "0.1.4",
470845
+ "0.1.6",
470846
470846
  " "
470847
470847
  ]
470848
470848
  }, undefined, true, undefined, this)
@@ -471042,7 +471042,7 @@ function WelcomeV2() {
471042
471042
  dimColor: true,
471043
471043
  children: [
471044
471044
  "v",
471045
- "0.1.4",
471045
+ "0.1.6",
471046
471046
  " "
471047
471047
  ]
471048
471048
  }, undefined, true, undefined, this)
@@ -471268,7 +471268,7 @@ function AppleTerminalWelcomeV2(t0) {
471268
471268
  dimColor: true,
471269
471269
  children: [
471270
471270
  "v",
471271
- "0.1.4",
471271
+ "0.1.6",
471272
471272
  " "
471273
471273
  ]
471274
471274
  }, undefined, true, undefined, this);
@@ -471522,7 +471522,7 @@ function AppleTerminalWelcomeV2(t0) {
471522
471522
  dimColor: true,
471523
471523
  children: [
471524
471524
  "v",
471525
- "0.1.4",
471525
+ "0.1.6",
471526
471526
  " "
471527
471527
  ]
471528
471528
  }, undefined, true, undefined, this);
@@ -474944,39 +474944,57 @@ ${args || "Review the entire ACE project in the current working directory only.
474944
474944
  });
474945
474945
  registerBundledSkill({
474946
474946
  name: "ace-explain",
474947
- description: "Explain an IBM ACE flow or ESQL module in plain language — what it does, how it works, its role in the integration flow",
474947
+ description: "Explain an IBM ACE flow, ESQL module, OR an entire application/service in plain language — what it does, how it works, and its role in the integration. Reads ALL artifacts (msgflows, ESQL, XSD, Swagger) before explaining, never just the Swagger.",
474948
474948
  aliases: ["ace-doc"],
474949
- model: "gemini-3.1-flash-lite",
474950
- whenToUse: "When the user wants to understand what an ACE flow or ESQL module does, needs documentation, or wants an end-to-end walkthrough",
474951
- argumentHint: "<file to explain>",
474952
- allowedTools: ["Read", "Glob", "Grep"],
474949
+ model: "gemini-3.5-flash",
474950
+ whenToUse: 'When the user wants to understand, summarize, document, or walk through what an ACE flow, ESQL module, application, service, or project does including requests like "what does this app do" or "explain this service"',
474951
+ argumentHint: "<file, app folder, or service to explain>",
474952
+ allowedTools: ["Read", "Glob", "Grep", "Bash"],
474953
474953
  userInvocable: true,
474954
474954
  async getPromptForCommand(args) {
474955
474955
  const prompt = `# ACE Code Explanation
474956
474956
 
474957
474957
  ${readInstructions([
474958
- "components/common-utils.md"
474958
+ "components/common-utils.md",
474959
+ "msgflow-xml-reference.md"
474959
474960
  ])}
474960
474961
 
474961
- Read the relevant file(s) and explain the code clearly to a developer who is unfamiliar with it. Use the common-utils reference to identify framework function calls and constants. Cover its role in the overall integration flow.
474962
+ You must explain the target to a developer unfamiliar with it. The target may be a single
474963
+ file OR an entire application/service folder.
474964
+
474965
+ ## MANDATORY procedure — do this before writing ANY explanation
474966
+
474967
+ 1. **Enumerate every file** in the target. If it is a folder, list the whole tree
474968
+ (e.g. \`Glob\` with \`**/*\` under the target, or \`ls -R\`). Do not assume the file set.
474969
+ 2. **Read EVERY artifact** — every \`.msgflow\`, \`.esql\`, \`.xsd\`, \`.json\`/Swagger,
474970
+ \`.subflow\`, \`.descriptor\`, and \`.properties\` file. Read them in full, not just one.
474971
+ 3. Only AFTER you have read all of them, write the explanation.
474972
+
474973
+ ⚠️ **The Swagger/JSON is NOT enough.** It only describes the request/response *contract* —
474974
+ it tells you nothing about what the service actually does. The real behavior lives in the
474975
+ **\`.msgflow\`** files (node wiring, routing, which subflows run) and the **\`.esql\`** files
474976
+ (the transformation and business logic). An explanation derived only from the \`.json\` is
474977
+ incomplete and wrong. If you have not read the msgflows and ESQL, you have not done the task.
474978
+ Use the msgflow XML reference above to decode the \`.msgflow\` node/connection structure.
474962
474979
 
474963
474980
  ## What to Cover
474964
474981
 
474965
- 1. **Purpose:** What does this flow/module do in one sentence?
474966
- 2. **End-to-end walkthrough:** Trace the message path from input to output, including all nodes and connections
474982
+ 1. **Purpose:** What does this app/flow/module do, in one sentence?
474983
+ 2. **End-to-end walkthrough:** Trace the message path from input to output across the flows
474984
+ every node, subflow, and connection (read from the .msgflow files, not inferred).
474967
474985
  3. **Message domains:** What parser domains are used (XMLNSC, JSON, SOAP, etc.)?
474968
- 4. **Key transformations:** What does the ESQL do to the message tree? What fields are mapped?
474969
- 5. **Error handling:** How are errors caught and routed? Which terminals are wired to error handlers?
474970
- 6. **External dependencies:** Database calls (stored procedures), SOAP/REST backend calls, queue names
474971
- 7. **Framework usage:** Which Qiwa framework subflows are used and why?
474972
- 8. **State management:** How is Environment.Variables used for intermediate state?
474973
- 9. **Non-obvious design decisions:** Anything a new developer might find confusing
474986
+ 4. **Key transformations:** What the ESQL does to the message tree; which fields are mapped.
474987
+ 5. **Error handling:** How errors are caught and routed; which terminals wire to error handlers.
474988
+ 6. **External dependencies:** DB calls (stored procedures), SOAP/REST backends, queue names.
474989
+ 7. **Framework usage:** Which Qiwa framework subflows are used and why.
474990
+ 8. **State management:** How Environment.Variables carries intermediate state.
474991
+ 9. **Non-obvious design decisions:** Anything a new developer might find confusing.
474974
474992
 
474975
- Use plain language. Assume the reader knows basic integration concepts but not this specific service.
474993
+ Use plain language. Assume the reader knows basic integration concepts but not this service.
474976
474994
 
474977
474995
  ## Target
474978
474996
 
474979
- ${args || "The user did not specify a file. Ask them which flow or ESQL module they want explained, or offer to give an overview of the entire project."}`;
474997
+ ${args || "The user did not specify a target. Ask which file, application folder, or service they want explained."}`;
474980
474998
  return [{ type: "text", text: prompt }];
474981
474999
  }
474982
475000
  });
@@ -492076,7 +492094,7 @@ Usage: orbitcode --remote "your task description"`, () => gracefulShutdown(1));
492076
492094
  pendingHookMessages
492077
492095
  }, renderAndRun);
492078
492096
  }
492079
- }).version("0.1.4 (Orbit AI)", "-v, --version", "Output the version number");
492097
+ }).version("0.1.6 (Orbit AI)", "-v, --version", "Output the version number");
492080
492098
  program2.option("-w, --worktree [name]", "Create a new git worktree for this session (optionally specify a name)");
492081
492099
  program2.option("--tmux", "Create a tmux session for the worktree (requires --worktree). Uses iTerm2 native panes when available; use --tmux=classic for traditional tmux.");
492082
492100
  if (canUserConfigureAdvisor()) {
@@ -492598,7 +492616,7 @@ if (false) {}
492598
492616
  async function main2() {
492599
492617
  const args = process.argv.slice(2);
492600
492618
  if (args.length === 1 && (args[0] === "--version" || args[0] === "-v" || args[0] === "-V")) {
492601
- console.log(`${"0.1.4"} (Orbit AI)`);
492619
+ console.log(`${"0.1.6"} (Orbit AI)`);
492602
492620
  return;
492603
492621
  }
492604
492622
  if (args.includes("--provider")) {
@@ -492702,4 +492720,4 @@ async function main2() {
492702
492720
  }
492703
492721
  main2();
492704
492722
 
492705
- //# debugId=6D27063EF650359964756E2164756E21
492723
+ //# debugId=412536CBF4AF9C5064756E2164756E21
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "orbit-code-ai",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "description": "Orbit AI – Your AI-powered IBM ACE coding companion",
5
5
  "type": "module",
6
6
  "author": "moenawaf",
@@ -20,7 +20,10 @@ Flags:
20
20
  they want before generating. Orbit does not assume a version.
21
21
  --crypto <name> jws-crypto object for JWT validation (default: <appsegment>-crypto-object)
22
22
  --backend-auth <name> APIC variable injected as backend auth header (e.g. servicenow-auth)
23
- --no-jwt omit jwt-validate + Check Expiration + 400 throw (no token enforcement)
23
+ --jwt force JWT on (skip the prompt); --no-jwt forces it off. If neither is
24
+ given, ASK the user whether JWT validation is required (see Clarify step).
25
+ --no-jwt omit jwt-validate + Check Expiration + 400 throw + ExpiredToken catch
26
+ (no token enforcement)
24
27
  --no-logging omit the middleware UpsertMDLogQ logging invoke (AmerApp-style)
25
28
  --no-envelope return the raw backend body instead of the {Header,Body} ESB envelope
26
29
  --no-cors disable CORS
@@ -90,10 +93,14 @@ in a single batched follow-up** (alongside the 2.0/3.0 question). Do NOT invent
90
93
  values for these:
91
94
 
92
95
  - **OpenAPI version** — 2.0 or 3.0 (always ask if unspecified).
96
+ - **JWT validation** — **ASK whether this API requires JWT validation** unless `--jwt`/`--no-jwt`
97
+ was passed or the prompt clearly states it. JWT is NOT assumed on. If **yes**, include the JWT
98
+ policies and ask for the crypto object (below). If **no**, omit JWT entirely (see the
99
+ "No-JWT shape" section) and do not ask for a crypto object.
93
100
  - **Channel / app + basePath** — e.g. `/v1/AmerApp`. The app segment also drives naming. There is
94
101
  no way to infer this from the operation name; ask (offer the known channels if helpful).
95
102
  - **JWT crypto object** — e.g. `$(amerapp-crypto-object)`. Tied to the channel, not the operation.
96
- Only needed when JWT is enabled (default). Ask; do not derive it from the API name.
103
+ **Only ask this when JWT is enabled.** Do not derive it from the API name.
97
104
  - **Backend auth** — the APIC variable and the header it goes on (`Authorization` vs `Token`), if
98
105
  the backend needs auth. Ask only if the prompt implies the backend is protected.
99
106
 
@@ -109,6 +116,9 @@ never a guess that looks real.
109
116
  apply the 3.0 transform section.
110
117
  2. **The `x-ibm-configuration.assembly` block is identical in 2.0 and 3.0.** Only the *contract*
111
118
  (paths/definitions/security/schemes) changes between versions.
119
+ 2b. **JWT is optional and not assumed.** Decide JWT on/off from `--jwt`/`--no-jwt`, an explicit
120
+ statement in the prompt, or the clarify answer. With JWT **off**, build the simpler "No-JWT shape"
121
+ (no jwt-validate, no Check Expiration, no switch, no ExpiredToken catch) — see that section.
112
122
  3. **Paste the frozen gatewayscript verbatim.** The JS strings below must be byte-exact — DataPower
113
123
  rejects malformed assembly. Do not "clean up" or reformat them.
114
124
  4. **GET vs POST**: GET → query/header params, no request `map`, no `definitions`. POST with body
@@ -206,7 +216,8 @@ x-ibm-configuration:
206
216
  target-url: >-
207
217
  $(sakani-mw-base-url)/MW/MWLogServices/GeneralLog/UpsertMDLogQ?Environment=$(env.path)&ServiceName=$(api.name)&UserName=$(client.app.id)&RequestDt=$(system.datetime)
208
218
 
209
- # ── FROZEN: JWT OMIT jwt-validate + Check Expiration if --no-jwt (then switch goes always-200) ──
219
+ # ── JWT (only when JWT is enabled). If JWT is OFF, omit jwt-validate + Check Expiration AND
220
+ # drop the switch below — run the backend call directly. See "No-JWT shape". ──
210
221
  - jwt-validate:
211
222
  version: 2.0.0
212
223
  title: jwt-validate
@@ -406,6 +417,83 @@ basePath: {basePath}
406
417
 
407
418
  ---
408
419
 
420
+ ## No-JWT shape (when JWT validation is OFF)
421
+
422
+ When the API does **not** require JWT, generate a simpler assembly: there's no token to validate, so
423
+ there's no `jwt-validate`, no `Check Expiration`, no `switch`, and no `ExpiredToken` — the backend
424
+ call runs directly, and the `catch` keeps only the `default` handler.
425
+
426
+ `x-ibm-configuration.assembly.execute` becomes (everything else — `info`, `cors`, `properties`,
427
+ `activity-log`, `paths`, `securityDefinitions`, `security`, `schemes`, `basePath` — is unchanged):
428
+
429
+ ```yaml
430
+ execute:
431
+ # POST-with-body only: leading parse (as in the main skeleton)
432
+ - gatewayscript:
433
+ version: 2.0.0
434
+ title: Prepare Request
435
+ source: "<<< the FROZEN Prepare Request source, verbatim >>>"
436
+
437
+ # Middleware logging — include unless --no-logging (same as main skeleton)
438
+ - set-variable: { version: 2.0.0, title: Log-set-variable, actions: [ { set: message.headers.Authorization, value: $(nhc-mw-auth), type: string } ] }
439
+ - invoke: # ...the Log-invoke (UpsertMDLogQ) policy, verbatim...
440
+
441
+ # Backend auth + static headers (only if --backend-auth / --backend-headers given)
442
+ - set-variable: { version: 2.0.0, title: set-variable, actions: [ { set: message.headers.{backend-auth-header}, value: $({backend-auth-var}), type: string } ] }
443
+
444
+ # POST-with-body only: request map (see "POST request map")
445
+
446
+ # ── Backend call — run directly, NOT wrapped in a switch ──
447
+ - invoke:
448
+ version: 2.2.0 # or 2.3.0 / detect / keep per the backend
449
+ title: invoke
450
+ backend-type: json
451
+ header-control: { type: blocklist, values: [] }
452
+ parameter-control: { type: allowlist, values: [] } # MUST list backend query params ({query})
453
+ timeout: 60
454
+ verb: {verb}
455
+ http-version: HTTP/1.1
456
+ chunked-uploads: true
457
+ persistent-connection: true
458
+ cache-response: protocol
459
+ cache-ttl: 900
460
+ websocket-upgrade: false
461
+ target-url: >-
462
+ {backend-target-url}
463
+ - parse:
464
+ version: 2.2.0
465
+ title: parse
466
+ parse-settings-reference:
467
+ parse-settings:
468
+ document_type: json
469
+
470
+ # Prepare Response Header — include unless --no-envelope (FROZEN source, verbatim)
471
+ - gatewayscript:
472
+ version: 2.0.0
473
+ title: Prepare Response Header
474
+ source: "<<< the FROZEN Prepare Response Header source, verbatim >>>"
475
+
476
+ - log: { version: 2.1.0, title: log, log-level: default, mode: gather-and-send }
477
+ finally: []
478
+ catch:
479
+ - default:
480
+ - gatewayscript:
481
+ version: 2.0.0
482
+ title: DeFaultCatch
483
+ source: |2-
484
+ # <<< the FROZEN DeFaultCatch source, verbatim >>>
485
+ ```
486
+
487
+ Notes for the No-JWT shape:
488
+ - Drop the `authorization` header param from `paths` (no bearer token is expected) unless the prompt
489
+ says otherwise.
490
+ - Keep `securityDefinitions`/`security` (the `X-IBM-Client-Id`/`X-IBM-Client-Secret` API-key gate is
491
+ independent of JWT).
492
+ - Everything else (logging, envelope, CORS, query/header params, POST map) follows the same flags as
493
+ the main skeleton.
494
+
495
+ ---
496
+
409
497
  ## POST request map (only when body fields are given)
410
498
 
411
499
  Insert this `map` **inside the 200 case, before the backend `invoke`**, and add the matching