Skip to content

CLI: orgs list prints each organization's created_at - #4

Merged
immakermatty merged 2 commits into
lazurio/cli-0.4.3from
lazurio/orgs-list-created-at
Oct 26, 2026
Merged

immakermatty merged 2 commits into
lazurio/cli-0.4.3from
lazurio/orgs-list-created-at

Conversation

@immakermatty

Copy link
Copy Markdown

Status: ready for review. Lazurio's build of the Composio CLI. Plan: HumanAndMachine-ai Mission Control DEV-6626.

Why

Lazurio's Launchpad has to find a person's default Composio organization, the one Composio creates when the account signs up, and make it current in the person's personal Environment. Otherwise Composio's browser sign-in lands in whichever organization is open in Composio's web dashboard.

The default organization is the account's oldest. GET /api/v3.1/org/list lists organizations newest first and marks none as the default, so created_at, which the API returns with every organization, is the only reliable way to tell. The CLI drops it: listOrganizations keeps only id and name, and composio orgs list prints [{id, name, is_selected_global_org}].

What changes

  • composio orgs list prints [{id, name, created_at, is_selected_global_org}] on a piped stdout. created_at is the API's string, unchanged (an ISO 8601 date-time).
  • listOrganizations returns OrganizationListItem, an OrganizationSummary plus created_at, taken from the typed @composio/client response, which already declares it as a required string.
  • Tests:
    • the client test gives each organization its own created_at and updated_at and expects exactly id, name and created_at;
    • a new orgs list command test expects both organizations' created_at on stdout, the selected marker unchanged, and the unchanged human-readable list on stderr;
    • the test layer's mock org.list now keeps an organization's own created_at (the default is still TIMESTAMP) instead of overwriting it.
  • CHANGELOG gets a patch entry under Unreleased, and LAZURIO.md lists this as the fourth difference from upstream (Release source becomes item 5).

What does not change

  • id, name and is_selected_global_org, their meaning, and the order of the organizations (the API's).
  • The human-readable lines on stderr.
  • OrganizationSummary stays {id, name}. The organization pickers of composio login and composio orgs switch, which also build a summary from an explicit org ID, compile and behave as before, and composio login --poll and orgs switch print the same JSON as before.
  • No other field of the API's organization, such as updated_at, is added.

Verification

  • Without the source change, the two tests fail only on the missing created_at; with it they pass. Focused run (pnpm exec vitest run on the orgs list, client, test-layer, login and orgs switch test files): 45/45.
  • pnpm typecheck at the root: 14/14 tasks, including the CLI's src and test typecheck.
  • pnpm test in ts/packages/cli: 135 files, 1431 passed, 1 skipped; the skill and lint-boundary validations pass.
  • pnpm lint at the root exits 0 with no findings in the changed files (its 50 warnings are all in untouched files). prettier --check on all seven changed files is clean.
  • Upstream next (d8f820480664) still prints only the other three fields (formatOrganizationsJson in ts/packages/cli/src/commands/orgs/list/orgs.list.format.ts); no upstream issue or pull request covers it.
  • Nothing ran against a real Composio account. The response shape comes from the typed client (@composio/client 2.0.0-rc.11) and the v3.1 OpenAPI, where created_at is a required string.

After merge

Release @composio/cli@0.4.3-lazurio.3 with the "Lazurio CLI Release" workflow. That is a Release and needs Matěj's go. Lazurio/LazurioPlatform then bumps its pinned build (installer commit and per-target SHA-256). Proposing the change upstream is Matěj's call; upstream next has since moved orgs list into orgs/list/, so it would be a small port.

🤖 Generated with Claude Code

immakermatty and others added 2 commits October 26, 2026 15:07
`composio orgs list` printed `[{id, name, is_selected_global_org}]` on a
piped stdout. `listOrganizations` kept only `id` and `name` from
`GET /api/v3.1/org/list`, so the `created_at` the API returns with every
organization never reached the output. The API lists organizations newest
first and marks none as the account's default, so `created_at` is the only
reliable way to find the organization Composio created when the account
signed up: its oldest.

`listOrganizations` now returns `OrganizationListItem`, an
`OrganizationSummary` with the API's `created_at` string unchanged, and
`orgs list` prints it next to the existing three fields. The lines on
stderr are unchanged. `OrganizationSummary` stays `{id, name}`, so the
organization pickers of `login` and `orgs switch`, which also build a
summary from an explicit org ID, compile and behave as before; the login
output still maps `id` and `name` explicitly.

The client test gives each organization its own `created_at` and
`updated_at` and expects exactly `id`, `name` and `created_at`. A new
`orgs list` command test serves two organizations with different
`created_at` values and expects both on stdout with the selected marker
unchanged; the test layer now keeps an organization's own `created_at`
instead of overwriting it with TIMESTAMP. Both tests fail without this
change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Lazurio build now differs from upstream in one more way: `composio
orgs list` prints each organization's `created_at`, where upstream (still
on `next`) prints only `id`, `name` and `is_selected_global_org`. List it
next to the other differences, so the Retirement condition covers it too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@agentrozjedemeai agentrozjedemeai 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.

Reviewed exact head c3e8611 against e52fc87. The change carries the API-created timestamp through the typed organization list and adds it only to the JSON output; the human-readable output and organization selection behavior remain unchanged. The API client contract declares created_at as a string. In an isolated clone, the CLI suite passed (1431 passed, 1 skipped), CLI typecheck passed, and oxlint/prettier passed for changed files. Head CI checks passed; no open threads or competing review requests. Non-blocking downstream note: orgs list defaults to 50 entries, so a future consumer selecting the oldest org should handle pagination if accounts can exceed that limit. No merge or release performed.

@immakermatty
immakermatty merged commit 5bcde7d into lazurio/cli-0.4.3 Oct 26, 2026
19 of 21 checks passed
immakermatty added a commit to Lazurio/LazurioPlatform that referenced this pull request Oct 26, 2026
…tes the organizations)

The personal Environment's default Composio organization is the account's
oldest, which only the `created_at` of `orgs list` tells. Lazurio's build
prints it from 0.4.3-lazurio.3 (Lazurio/composio#4, released 2026-10-26 on
Matěj's go), so the pin moves there: the version and tag, the installer at
the release's own commit 5bcde7de (its install.sh byte for byte the one of
0.4.3-lazurio.2) and the four archives' SHA-256 as the release's
checksums.txt lists them and the downloaded archives hash.

The catalog's target state names four changes; tests that pin the build,
docs/integrations.md, environment-tools.md, launchpad-development.md and the
F42 addendum of 2026-10-26 (point 5) follow. An Environment with
0.4.3-lazurio.2 keeps the person's choice until Composio is updated in
Settings → Tools, which says it is not the build Lazurio uses.

Tests: 646 in the related 44 files pass; check:static passes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@immakermatty
immakermatty deleted the lazurio/orgs-list-created-at branch October 26, 2026 15:46
immakermatty added a commit to Lazurio/LazurioPlatform that referenced this pull request Oct 26, 2026
…osio organization (#661)

* Integrace: a personal Environment works in the account's default Composio organization

On a personal Environment the Integrace showed the apps of a work Composio
organization: Composio's browser sign-in lands in the organization open in
Composio's dashboard, often an Organization's one since the person creates
those there, and the Launchpad left a personal Environment's organization to
the person because the CLI did not say which one is the default (F42,
addendum (2) of 2026-10-13, point 7). Root decision 0162 says the personal
Environment uses the account's default organization.

A Machine binding whose owner is a person now has the rule `default`: the
account's default organization is its oldest (Composio marks none and lists
the newest first), told by the `created_at` that Lazurio's build of the CLI
prints in `orgs list` from 0.4.3-lazurio.3 on. The Integrace reading, the
sign-in dialog and every link and removal make it current where another
one is, as an Organization's Environment does with the one of its name; the
dialog offers no choice there, and the page and agents name it as Composio
does. Without a date for each organization, or between two equally old,
nothing is guessed and the person's choice stands as before. A computer and
Organization and Team Environments are unchanged.

F42 addendum of 2026-10-26; docs/integrations.md; the preview's fake
Composio dates its organizations. Tests: 160 in the six affected files and
653 in the related 45 pass; check:static passes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Integrace: no default Composio organization from a full page of orgs list

`composio orgs list` prints one page of Composio's list, at most 50
organizations, the newest first, and the CLI does not page further. A full
page may leave out the oldest organizations, the account's default among
them, so the rule would take an Organization's one for the default. A list
of 50 now tells no default and the person's choice stands, as without
dates (Pablo's review of Lazurio/composio#4, a non-blocking note).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Tools: pin Lazurio's Composio CLI build 0.4.3-lazurio.3 (orgs list dates the organizations)

The personal Environment's default Composio organization is the account's
oldest, which only the `created_at` of `orgs list` tells. Lazurio's build
prints it from 0.4.3-lazurio.3 (Lazurio/composio#4, released 2026-10-26 on
Matěj's go), so the pin moves there: the version and tag, the installer at
the release's own commit 5bcde7de (its install.sh byte for byte the one of
0.4.3-lazurio.2) and the four archives' SHA-256 as the release's
checksums.txt lists them and the downloaded archives hash.

The catalog's target state names four changes; tests that pin the build,
docs/integrations.md, environment-tools.md, launchpad-development.md and the
F42 addendum of 2026-10-26 (point 5) follow. An Environment with
0.4.3-lazurio.2 keeps the person's choice until Composio is updated in
Settings → Tools, which says it is not the build Lazurio uses.

Tests: 646 in the related 44 files pass; check:static passes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <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