feat(browser): add ONES adapter support for tasks and worklog commands#386
feat(browser): add ONES adapter support for tasks and worklog commands#386jackwener merged 2 commits intojackwener:mainfrom
Conversation
|
Thanks for the thorough work — the adapter covers a wide range of ONES functionality with good documentation. That said, ONES is a niche enterprise tool with a small user base compared to built-in adapters. Adding 1,428 lines (16 files) to the core repo means the maintainers take on the maintenance burden — especially since this depends on ONES' legacy/project API which may change without notice. This would be a great fit for the plugin system: |
|
Ones is not a small user base project management software😂, and large enterprises still use a lot. If necessary, I will adjust it into a plugin.
…---Original---
From: ***@***.***>
Date: Wed, Mar 25, 2026 23:23 PM
To: ***@***.***>;
Cc: ***@***.******@***.***>;
Subject: Re: [jackwener/opencli] feat(browser): add ONES adapter support fortasks and worklog commands (PR #386)
Astro-Han left a comment (jackwener/opencli#386)
Thanks for the thorough work — the adapter covers a wide range of ONES functionality with good documentation.
That said, ONES is a niche enterprise tool with a small user base compared to built-in adapters. Adding 1,428 lines (16 files) to the core repo means the maintainers take on the maintenance burden — especially since this depends on ONES' legacy/project API which may change without notice.
This would be a great fit for the plugin system: opencli-plugin-ones. Same YAML/TS format, automatic discovery, and you own the maintenance. See the plugin guide.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
|
抱歉,说 ONES 用户少确实不准确,在国内企业市场是头部产品。感谢指正! |
Add ONES auth/session commands, task listing/details utilities, and worklog operations, with related docs and helper utilities.
a94ecc6 to
8c47901
Compare
|
Thanks for the ONES adapter contribution. I rebased it onto latest main, fixed the runtime and packaging issues we found during review, reran targeted tests/typecheck/build, and then merged it. |
What is ONES?
ONES(ones.com) is a project management / R&D collaboration platform (tasks, projects, work items, and time tracking). Many teams use self-hosted or SaaS deployments with browser-based login. This PR adds an OpenCLI adapter that calls the ONES Project API (legacy / “project open API” style endpoints) using the user’s already authenticated Chrome session via Browser Bridge, so CLI workflows can reuse the same cookies/session as the web UI.
Summary
Introduces an ONES site adapter for OpenCLI. Requests run in-page with fetch and credentials: 'include' against ONES_BASE_URL, matching the origin you have open in Chrome. Optional ones login supports scripted authentication when needed; otherwise you can rely on logging in through the browser.
What’s included
Commands
Command Purpose
opencli ones login / logout Optional scripted login (auth/login); logout (auth/logout)
opencli ones me Current user profile (users/me)
opencli ones token-info Token / user / team summary (auth/token_info); useful for discovering team UUIDs
opencli ones tasks Team task list with filters (e.g. limit, project, assignee)
opencli ones my-tasks “My” tasks with modes (assign, field004, owner, both) for different field conventions
opencli ones task Single work item detail by UUID
opencli ones worklog Log or backfill hours (GraphQL addManhour with REST fallbacks where applicable)
Implementation
Shared helpers: base URL building, authenticated in-page fetch, user UUID resolution, manhour scaling (ONES_MANHOUR_SCALE), and utilities to enrich tasks with status/project labels where supported by the API.
Documentation
docs/adapters/browser/ones.md — Browser Bridge prerequisites, examples, and behavior notes
docs/adapters-doc/ones.md — Environment variables and quick command reference
Configuration
ONES_BASE_URL (required) — Same origin as your ONES tab in Chrome (no trailing slash).
Optional — ONES_USER_ID / ONES_AUTH_TOKEN if your deployment requires documented headers; ONES_TEAM_UUID to avoid repeating --team; credentials env vars for ones login as documented.
How to test
Install Browser Bridge, open Chrome, and log into your ONES instance.
export ONES_BASE_URL=.
opencli ones me and opencli ones token-info — confirm session and read team UUIDs.
opencli ones tasks and opencli ones my-tasks .
opencli ones task --team ; opencli ones worklog --team (use --date for backfill).