Skip to content

IRIS CLI v1.1.24 — fix auth targeting wrong DB - #2

Merged
mayoalexander merged 2 commits into
mainfrom
dev
Apr 15, 2026
Merged

IRIS CLI v1.1.24 — fix auth targeting wrong DB#2
mayoalexander merged 2 commits into
mainfrom
dev

Conversation

@mayoalexander

Copy link
Copy Markdown

Summary

  • fix: iris auth login was creating tokens on apiv2.heyiris.io (old DigitalOcean) while all API calls go to raichu.heyiris.io (Railway). Tokens created on the wrong DB caused instant 401 on iris copycat and other commands.
  • feat: iris campaign create interactive wizard for outreach campaigns

Fixes bug #53000 and #53001.

Changes

  • auth.ts — default auth URL → raichu.heyiris.io
  • install / install.ps1 — all hardcoded apiv2 URLs → raichu
  • SKILL.md — updated docs

Test plan

  • iris auth login --force → token created on Railway DB
  • iris copycat video <url> → no 401
  • Fresh install via curl -fsSL https://heyiris.io/install-iris.sh | bash → auth flow hits Railway

🤖 Generated with Claude Code

mayoalexander and others added 2 commits April 14, 2026 16:23
Creates board + outreach strategy + schedule + IG session in one flow.
Supports 9 verticals (restaurants, venues, dentists, creators, etc.)
with custom option. Configures channel (IG DM, email, LinkedIn, both),
frequency, message style, and warmup behavior.

Also: iris campaign list — shows all campaigns from som-config.js.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… sunsetted DO

iris auth login was creating API tokens on apiv2.heyiris.io (old DigitalOcean)
while all subsequent API calls went to raichu.heyiris.io (Railway). Tokens
created on the wrong DB caused immediate 401 on copycat and other commands.

Fixes bug #53000 and #53001.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings April 15, 2026 00:50
@mayoalexander
mayoalexander merged commit 117f3d7 into main Apr 15, 2026
0 of 4 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the IRIS CLI to point auth/token creation and installer flows at the Railway-backed API host (raichu.heyiris.io) to avoid generating tokens in the wrong DB, and adds a new interactive CLI workflow for creating outreach campaigns.

Changes:

  • Switch default IRIS Platform auth base URL from apiv2.heyiris.ioraichu.heyiris.io.
  • Replace hardcoded apiv2 URLs in install and install.ps1 with raichu.
  • Add iris campaign command with create (interactive wizard) and list (reads local som-config.js).

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
packages/opencode/src/index.ts Registers new platform commands (campaign + calendar) into the CLI command tree.
packages/opencode/src/cli/cmd/platform-campaign.ts New interactive “campaign” wizard and campaign listing command.
packages/opencode/src/cli/cmd/auth.ts Updates default auth URL to Railway host for login/token issuance.
install.ps1 Updates installer API base URL to Railway host.
install Updates installer API/auth endpoints to Railway host.
.opencode/skill/iris-platform/SKILL.md Updates documented default API base URL to Railway host.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

}),
})
if (!(await handleApiError(bloqRes, "Create board"))) { spinner.stop("Failed", 1); prompts.outro("Done"); return }
const bloq = ((await bloqRes.json()) as any)?.data ?? (await bloqRes.json())
Comment on lines +286 to +296
prompts.log.info("Opening browser for Instagram login...")
try {
execSync(
`IG_ACCOUNT=${igAccount} IG_USERNAME=${igAccount} npx playwright test tests/e2e/save-instagram-session.spec.ts --headed --timeout 300000`,
{ cwd: join(homedir(), "Sites", "freelabel"), stdio: "inherit" }
)
prompts.log.info(success("IG session saved"))
} catch {
prompts.log.warn("Session save failed or was cancelled. Run later:")
prompts.log.info(dim(`IG_ACCOUNT=${igAccount} npm run som:save-session`))
}
Comment on lines +35 to +52
// Step 1: Vertical
let vertical = args.vertical
if (!vertical) {
vertical = (await prompts.select({
message: "What vertical is this campaign for?",
options: [
{ value: "restaurants", label: "Restaurants & Food" },
{ value: "venues", label: "Venues & Event Spaces" },
{ value: "dentists", label: "Dentists & Medical" },
{ value: "creators", label: "Content Creators" },
{ value: "realtors", label: "Real Estate Agents" },
{ value: "fitness", label: "Fitness & Wellness" },
{ value: "beauty", label: "Beauty & Salons" },
{ value: "lawyers", label: "Law Firms" },
{ value: "custom", label: "Custom (enter your own)" },
],
})) as string
if (prompts.isCancel(vertical)) { prompts.outro("Cancelled"); return }
Comment on lines 94 to +97
// TODO: platform-mail and platform-imessage commands (not yet implemented)
// import { PlatformMailCommand } from "./cli/cmd/platform-mail"
// import { PlatformImessageCommand } from "./cli/cmd/platform-imessage"
import { PlatformCalendarCommand } from "./cli/cmd/platform-calendar"
Comment on lines 258 to 262
// .command(reg(PlatformMailCommand)) // TODO: not yet implemented
// .command(reg(PlatformImessageCommand)) // TODO: not yet implemented
.command(reg(PlatformCalendarCommand))
.command(reg(PlatformWalletCommand))
// PHP-port commands — config, app, automation, automation:test
mayoalexander added a commit that referenced this pull request Aug 2, 2026
Wires the TDD'd query layer to chat.db and ships the command. Apple Cash
transfers were invisible: lib/imessage.ts requires a text body (:227 in SQL,
:298 in the parser) and a payment has none, so 149 of them sat in the database
while the CLI reported nothing. That is how a real $50 payout went missing.

  iris imessage payments                    all payments, newest first
  iris imessage payments --contact Flo      finds the "Flozzel Smith" card
  iris imessage payments --check            reconciliation issues only
  --sent --received --since --until --reference --labelled --unlabelled
  --sort date|contact|reference --order --limit --offset --days --json

Live output, real data:

  2026-07-30 20:57:46  →  Rashad Bernard   IRIS BUG BOUNTY #2
  2026-07-29 14:01:50  →  Flozzel Smith    IRIS BUG BOUNTY #1  ⚠ label says "FLO SMITH"

That warning is the defect that cost us an afternoon, now produced automatically.

THREE THINGS THE FIRST REAL RUN BROKE ON, none of which fixtures could catch:

  - `.separator` does not survive imessage.query()'s shell escaping. Fields are
    now joined with char(31) INSIDE the SQL. Splitting on "|" — sqlite's default
    — would corrupt any row whose text contains a pipe, and text goes last so an
    overflow cannot shift earlier fields.
  - Selecting hex(attributedBody) across a year of messages overflowed the
    subprocess buffer outright (ENOBUFS). Now only the time windows AROUND
    payments are scanned, merged so a burst does not emit redundant clauses.
    Cost is proportional to PAYMENTS, not message history: 314 messages scanned
    in ~740ms cold and ~250ms warm, against 200,000 that could not complete.
  - The counterparty must come from the chat, not the handle: an outbound
    message has handle_id 0, so joining only `handle` drops every payment YOU
    sent — which, for a payer, is all of them.

The amount is never rendered and never totalled; the JSON carries
`amount_available: false` with a note, so no consumer can read a missing amount
as a zero. Apple does not store it — verified by comparing a $50 screenshot
against that payment's own row.

Does not touch `iris payments <lead-id>` (platform-payments.ts), which is Stripe.
48 payments tests green; full suite within the session's flaky band.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
mayoalexander added a commit that referenced this pull request Aug 19, 2026
…ed on a 404

`iris integrations list` collapsed every probe failure into "unverified — could
not probe", which tells the reader nothing and cost real debugging hours.

Two worse bugs surfaced while fixing that:

1. The gmail and google-drive probes returned "verified" for ANY response that
   was not 401/403 — including 404 and 500. Both probe endpoints currently 404
   (/api/v1/leads/0/gmail-threads, /api/v1/integrations/exec), so Gmail has been
   rendering a green [verified] while its probe does not resolve at all. The
   health signal on those rows was meaningless.

2. Probe results were keyed by integration TYPE, not id, and the drive probe
   never passed integration_id. All three google-drive accounts (#4, #11, #12)
   therefore shared one result taken from whichever connection the API picks by
   default — two accounts could be dead and every row would show the third's
   status. The comment directly above that code says multi-account visibility is
   the point of the command.

Changes:

- Probes return { state, reason, fix } instead of a bare string, so every row
  states its cause and, where one exists, the command that fixes it.
- New "unknown" state, distinct from failure. A 404 on the PROBE path means we
  cannot determine the integration's health; claiming either verified or
  unverified would be unsupported. Rendered neutral rather than red, because the
  fix belongs to us, not the user.
- Network failures are classified — connection refused / timeout / DNS — rather
  than collapsing into one string.
- Results keyed by integration id; the drive probe passes integration_id so each
  account is genuinely probed.
- The calendar probe distinguishes bridge-not-running, no-bridge-key,
  key-rejected and HTTP-n, each with `iris hive doctor` as the fix.

    before  gmail #3            [verified]
    after   gmail #3            [unknown] — probe endpoint returned 404; status not determined
    before  google-calendar #2  [unverified] — could not probe
    after   google-calendar #2  [unverified] — no bridge key configured → iris hive doctor

Verified by running the command from source, not by reading the diff. Typecheck
clean; the remaining tsc error (session/llm.ts:88 TS2589) is pre-existing and
reproduces with this change stashed.

Refs #180929, #181016

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants