Metadata-Version: 2.4
Name: concinno-skills-dev
Version: 0.1.0
Summary: Developer platform agent skills (GitHub/Jira/Linear/GitLab) for Concinno — permissive-licensed SDKs (MIT/BSD) + httpx REST, no LGPL/GPL.
Project-URL: Homepage, https://github.com/aiking931931/concinno
Project-URL: Issues, https://github.com/aiking931931/concinno/issues
Project-URL: Changelog, https://github.com/aiking931931/concinno/blob/main/projects/concinno-skills-dev/CHANGELOG.md
Author-email: "AI King (Chen-Xuan Wang)" <me@ai-king.dev>
License-Expression: Apache-2.0
Keywords: agent,concinno,developer,github,gitlab,issue-tracking,jira,linear,skills
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Bug Tracking
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Software Development :: Version Control :: Git
Requires-Python: >=3.10
Requires-Dist: concinno>=2.15.1
Requires-Dist: githubkit>=0.11
Requires-Dist: httpx>=0.27
Requires-Dist: jira>=3.8
Provides-Extra: dev
Requires-Dist: mypy>=1.10; extra == 'dev'
Requires-Dist: pytest-cov>=5; extra == 'dev'
Requires-Dist: pytest>=8; extra == 'dev'
Requires-Dist: ruff>=0.7; extra == 'dev'
Description-Content-Type: text/markdown

# concinno-skills-dev

Developer-platform agent skills for [Concinno](https://pypi.org/project/concinno/).
Thin wrappers around the REST / GraphQL layer of each developer tool,
exposed as Concinno `Tool` classes that auto-mount into
`concinno.tools.registry.ToolRegistry` via entry-points.

## Status

MVP (0.1.0) — five tools covering the four most-used developer
issue / PR trackers:

| Tool class           | Platform | Underlying SDK / API        | Licence      |
|----------------------|----------|-----------------------------|--------------|
| `GithubIssue`        | GitHub   | `githubkit`                 | MIT          |
| `GithubPullRequest`  | GitHub   | `githubkit`                 | MIT          |
| `JiraIssue`          | Jira     | `jira` (`jira-python`)      | BSD-2-Clause |
| `LinearIssue`        | Linear   | `httpx` + GraphQL (no SDK)  | BSD-3 (httpx)|
| `GitlabIssue`        | GitLab   | `httpx` + REST v4 (no SDK)  | BSD-3 (httpx)|

### Licence discipline

- `PyGithub` is **LGPL-3.0** → we deliberately use `githubkit` (MIT)
  instead.
- `python-gitlab` is **LGPL-3.0** → we wrap the GitLab REST v4 API with
  `httpx` directly; no copy-left dependency enters the Concinno
  ecosystem through this package.

## Install

```bash
pip install concinno-skills-dev
```

All four runtime deps (`githubkit`, `jira`, `httpx`, `concinno`) are
pulled in automatically.

## Credentials

Each platform's token lives under a well-known key in the Concinno
`CredentialStore`, which reads in order:

1. Process runtime overrides via `CredentialStore.set(...)`.
2. Env var `CONCINNO_CRED_<UPPER_KEY>`.
3. `~/.concinno/credentials.json`.

| Key                | Env var                              | Used by                        |
|--------------------|--------------------------------------|--------------------------------|
| `github_token`     | `CONCINNO_CRED_GITHUB_TOKEN`         | `GithubIssue`, `GithubPullRequest` |
| `jira_server`      | `CONCINNO_CRED_JIRA_SERVER`          | `JiraIssue`                    |
| `jira_email`       | `CONCINNO_CRED_JIRA_EMAIL`           | `JiraIssue`                    |
| `jira_api_token`   | `CONCINNO_CRED_JIRA_API_TOKEN`       | `JiraIssue`                    |
| `linear_api_key`   | `CONCINNO_CRED_LINEAR_API_KEY`       | `LinearIssue`                  |
| `gitlab_token`     | `CONCINNO_CRED_GITLAB_TOKEN`         | `GitlabIssue`                  |
| `gitlab_url`       | `CONCINNO_CRED_GITLAB_URL` (optional)| `GitlabIssue` (self-hosted)    |

Example `~/.concinno/credentials.json`:

```jsonc
{
  "github_token": "ghp_...",
  "jira_server": "https://acme.atlassian.net",
  "jira_email": "you@acme.com",
  "jira_api_token": "...",
  "linear_api_key": "lin_api_...",
  "gitlab_token": "glpat-...",
  "gitlab_url": "https://gitlab.com"
}
```

If a token is missing the tool returns
`{"error": "no <service> credentials — set via CredentialStore or env ..."}`
rather than crashing.

## Usage via Concinno `ToolRegistry`

With `CONCINNO_LOAD_PLUGINS=1`, the default registry auto-mounts every
tool:

```python
import os
os.environ["CONCINNO_LOAD_PLUGINS"] = "1"

from concinno.tools.registry import get_default_registry

reg = get_default_registry()
assert {
    "GithubIssue", "GithubPullRequest",
    "JiraIssue", "LinearIssue", "GitlabIssue",
} <= set(reg.list_deferred())

gh = reg.get("GithubIssue")
gh.call(action="list", repo="aiking931931/concinno", state="open")
```

## Direct Python usage

```python
from concinno_skills_dev import (
    GithubIssue,
    GithubPullRequest,
    JiraIssue,
    LinearIssue,
    GitlabIssue,
)

GithubIssue().call(action="list", repo="aiking931931/concinno")
GithubPullRequest().call(action="create", repo="o/r",
                         title="feat", head="feat-x", base="main")
JiraIssue().call(action="search", jql="project=PROJ AND status=Open")
LinearIssue().call(action="query", limit=25)
GitlabIssue().call(action="list", project="group/repo", state="opened")
```

All tools return `{"ok": True, ...}` on success or `{"error": "..."}`
on failure — same shape as Concinno built-in tools. No exceptions
escape the `call()` surface.

## Concurrency

All five tools set `is_concurrency_safe = False`. Developer-platform
rate limits (GitHub 5 000/hr, Linear complexity-budget, Jira per-plan,
GitLab 2 000/min) make serial calls the sane default; the Concinno
scheduler honours this automatically.

## Licence

Apache-2.0. See `LICENSE` in the Concinno monorepo.
