orbit-code-ai 0.1.4 → 0.1.5
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 +10 -10
- package/package.json +1 -1
- package/skills/apic-api/SKILL.md +91 -3
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.
|
|
83715
|
+
out.push(` ${DIM}${rgb(...DIMCOL)}orbit-ai ${RESET}${rgb(...ACCENT)}v${"0.1.5"}${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-
|
|
334186
|
+
const buildTime = new Date("2026-06-23T09:09:31.460Z").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.
|
|
358603
|
+
value: "0.1.5"
|
|
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.
|
|
470845
|
+
"0.1.5",
|
|
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.
|
|
471045
|
+
"0.1.5",
|
|
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.
|
|
471271
|
+
"0.1.5",
|
|
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.
|
|
471525
|
+
"0.1.5",
|
|
471526
471526
|
" "
|
|
471527
471527
|
]
|
|
471528
471528
|
}, undefined, true, undefined, this);
|
|
@@ -492076,7 +492076,7 @@ Usage: orbitcode --remote "your task description"`, () => gracefulShutdown(1));
|
|
|
492076
492076
|
pendingHookMessages
|
|
492077
492077
|
}, renderAndRun);
|
|
492078
492078
|
}
|
|
492079
|
-
}).version("0.1.
|
|
492079
|
+
}).version("0.1.5 (Orbit AI)", "-v, --version", "Output the version number");
|
|
492080
492080
|
program2.option("-w, --worktree [name]", "Create a new git worktree for this session (optionally specify a name)");
|
|
492081
492081
|
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
492082
|
if (canUserConfigureAdvisor()) {
|
|
@@ -492598,7 +492598,7 @@ if (false) {}
|
|
|
492598
492598
|
async function main2() {
|
|
492599
492599
|
const args = process.argv.slice(2);
|
|
492600
492600
|
if (args.length === 1 && (args[0] === "--version" || args[0] === "-v" || args[0] === "-V")) {
|
|
492601
|
-
console.log(`${"0.1.
|
|
492601
|
+
console.log(`${"0.1.5"} (Orbit AI)`);
|
|
492602
492602
|
return;
|
|
492603
492603
|
}
|
|
492604
492604
|
if (args.includes("--provider")) {
|
|
@@ -492702,4 +492702,4 @@ async function main2() {
|
|
|
492702
492702
|
}
|
|
492703
492703
|
main2();
|
|
492704
492704
|
|
|
492705
|
-
//# debugId=
|
|
492705
|
+
//# debugId=DE134726E7DCEFCE64756E2164756E21
|
package/package.json
CHANGED
package/skills/apic-api/SKILL.md
CHANGED
|
@@ -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
|
-
--
|
|
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
|
|
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
|
-
# ──
|
|
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
|