@oasissys/bitbucket-cli 0.1.1

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.
@@ -0,0 +1,148 @@
1
+ /**
2
+ * Minimal TOON (Token-Oriented Object Notation) encoder.
3
+ *
4
+ * TOON is the stdout format for AXI CLIs — ~40% fewer tokens than JSON while
5
+ * staying readable by agents. See https://toonformat.dev/reference/spec.html.
6
+ *
7
+ * Keep all internal logic on plain JS objects; call `encode()` only at the
8
+ * output boundary. This encoder covers the shapes an AXI CLI actually emits:
9
+ *
10
+ * - objects key: value
11
+ * - nested objects key:\n child: value
12
+ * - tabular arrays key[N]{f1,f2}:\n a,b\n c,d
13
+ * - primitive arrays key[N]: a,b,c
14
+ * - empty arrays key[0]:
15
+ *
16
+ * Two-space indentation, no tabs, no trailing newline (§12).
17
+ */
18
+ const INDENT = " ";
19
+ function isPlainObject(v) {
20
+ return typeof v === "object" && v !== null && !Array.isArray(v);
21
+ }
22
+ function isScalar(v) {
23
+ return v === null || v === undefined || ["string", "number", "boolean"].includes(typeof v);
24
+ }
25
+ // §7.2 — a string MUST be quoted when it would otherwise be ambiguous with a
26
+ // structural token, a literal (true/false/null), or a number. We also quote on
27
+ // the comma delimiter so the same formatter is safe inside tabular rows.
28
+ const NUMERIC_LIKE = /^-?\d+(?:\.\d+)?(?:e[+-]?\d+)?$/i;
29
+ const NEEDS_QUOTE = /[:"\\[\]{},]/;
30
+ function hasControlChar(s) {
31
+ for (let i = 0; i < s.length; i++) {
32
+ if (s.charCodeAt(i) <= 0x1f)
33
+ return true;
34
+ }
35
+ return false;
36
+ }
37
+ function quoteString(s) {
38
+ const needs = s.length === 0 ||
39
+ s !== s.trim() ||
40
+ s === "true" ||
41
+ s === "false" ||
42
+ s === "null" ||
43
+ NUMERIC_LIKE.test(s) ||
44
+ NEEDS_QUOTE.test(s) ||
45
+ hasControlChar(s);
46
+ if (!needs)
47
+ return s;
48
+ const escaped = s
49
+ .replace(/\\/g, "\\\\")
50
+ .replace(/"/g, '\\"')
51
+ .replace(/\n/g, "\\n")
52
+ .replace(/\r/g, "\\r")
53
+ .replace(/\t/g, "\\t");
54
+ return `"${escaped}"`;
55
+ }
56
+ function formatScalar(v) {
57
+ if (v === null || v === undefined)
58
+ return "null";
59
+ if (typeof v === "boolean")
60
+ return v ? "true" : "false";
61
+ if (typeof v === "number") {
62
+ if (!Number.isFinite(v))
63
+ return "null";
64
+ return Object.is(v, -0) ? "0" : String(v);
65
+ }
66
+ if (typeof v === "string")
67
+ return quoteString(v);
68
+ // Non-scalar leaked into a scalar slot — stringify defensively rather than throw.
69
+ return quoteString(JSON.stringify(v));
70
+ }
71
+ function tableFields(arr) {
72
+ // Tabular form is only valid when every row is a flat object (scalar values)
73
+ // sharing the first row's key set. Otherwise fall back to a list.
74
+ const fields = Object.keys(arr[0]);
75
+ if (fields.length === 0)
76
+ return null;
77
+ for (const row of arr) {
78
+ const keys = Object.keys(row);
79
+ if (keys.length !== fields.length || !fields.every(f => f in row))
80
+ return null;
81
+ if (!fields.every(f => isScalar(row[f])))
82
+ return null;
83
+ }
84
+ return fields;
85
+ }
86
+ function emitArray(key, arr, depth, lines) {
87
+ const pad = INDENT.repeat(depth);
88
+ if (arr.length === 0) {
89
+ lines.push(`${pad}${key}[0]:`);
90
+ return;
91
+ }
92
+ if (arr.every(isScalar)) {
93
+ lines.push(`${pad}${key}[${arr.length}]: ${arr.map(formatScalar).join(",")}`);
94
+ return;
95
+ }
96
+ if (arr.every(isPlainObject)) {
97
+ const rows = arr;
98
+ const fields = tableFields(rows);
99
+ if (fields) {
100
+ lines.push(`${pad}${key}[${arr.length}]{${fields.join(",")}}:`);
101
+ for (const row of rows) {
102
+ lines.push(`${INDENT.repeat(depth + 1)}${fields.map(f => formatScalar(row[f])).join(",")}`);
103
+ }
104
+ return;
105
+ }
106
+ // Non-uniform / nested objects → list of blocks.
107
+ lines.push(`${pad}${key}[${arr.length}]:`);
108
+ for (const row of rows) {
109
+ lines.push(`${INDENT.repeat(depth + 1)}-`);
110
+ emitObject(row, depth + 2, lines);
111
+ }
112
+ return;
113
+ }
114
+ // Mixed array — stringify each element as a scalar.
115
+ lines.push(`${pad}${key}[${arr.length}]: ${arr.map(formatScalar).join(",")}`);
116
+ }
117
+ function emitObject(obj, depth, lines) {
118
+ const pad = INDENT.repeat(depth);
119
+ for (const [key, value] of Object.entries(obj)) {
120
+ if (value === undefined)
121
+ continue;
122
+ if (Array.isArray(value)) {
123
+ emitArray(key, value, depth, lines);
124
+ }
125
+ else if (isPlainObject(value)) {
126
+ lines.push(`${pad}${key}:`);
127
+ emitObject(value, depth + 1, lines);
128
+ }
129
+ else {
130
+ lines.push(`${pad}${key}: ${formatScalar(value)}`);
131
+ }
132
+ }
133
+ }
134
+ /** Encode a JS value to a TOON document (no trailing newline). */
135
+ export function encode(value) {
136
+ const lines = [];
137
+ if (Array.isArray(value)) {
138
+ // Root array: emit with an empty key so the header is a bare `[N]{...}:`.
139
+ emitArray("", value, 0, lines);
140
+ return lines.join("\n");
141
+ }
142
+ if (isPlainObject(value)) {
143
+ emitObject(value, 0, lines);
144
+ return lines.join("\n");
145
+ }
146
+ return formatScalar(value);
147
+ }
148
+ //# sourceMappingURL=toon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toon.js","sourceRoot":"","sources":["../../src/toon.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,MAAM,MAAM,GAAG,IAAI,CAAC;AAIpB,SAAS,aAAa,CAAC,CAAU;IAC/B,OAAO,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;AAClE,CAAC;AAED,SAAS,QAAQ,CAAC,CAAU;IAC1B,OAAO,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,SAAS,IAAI,CAAC,QAAQ,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAC,QAAQ,CA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AAC;AAED,kEAAkE;AAClE,MAAM,UAAU,MAAM,CAAC,KAAc;IACnC,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QACzB,0EAA0E;QAC1E,SAAS,CAAC,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC;QAC/B,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;IACD,IAAI,aAAa,CAAC,KAAK,CAAC,EAAE,CAAC;QACzB,UAAU,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC;QAC5B,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;IACD,OAAO,YAAY,CAAC,KAAK,CAAC,CAAC;AAC7B,CAAC"}
@@ -0,0 +1,58 @@
1
+ export interface CleanRepository {
2
+ slug: string;
3
+ name: string;
4
+ project: {
5
+ key: string;
6
+ name: string;
7
+ };
8
+ cloneUrl?: string;
9
+ state: string;
10
+ forkable: boolean;
11
+ }
12
+ export interface CleanBranch {
13
+ id: string;
14
+ displayId: string;
15
+ latestCommit: string;
16
+ isDefault: boolean;
17
+ }
18
+ export interface CleanPullRequest {
19
+ id: number;
20
+ title: string;
21
+ description: string;
22
+ state: string;
23
+ author: string;
24
+ fromBranch: string;
25
+ toBranch: string;
26
+ reviewers: CleanReviewer[];
27
+ version: number;
28
+ createdDate: string;
29
+ updatedDate: string;
30
+ link?: string;
31
+ }
32
+ export interface CleanReviewer {
33
+ user: string;
34
+ slug: string;
35
+ approved: boolean;
36
+ status: string;
37
+ }
38
+ export interface CleanPrComment {
39
+ id: number;
40
+ text: string;
41
+ author: string;
42
+ createdDate: string;
43
+ updatedDate: string;
44
+ }
45
+ export interface CleanActivity {
46
+ id: number;
47
+ action: string;
48
+ createdDate: string;
49
+ user: string;
50
+ comment?: string;
51
+ }
52
+ export interface CleanCommit {
53
+ id: string;
54
+ displayId: string;
55
+ message: string;
56
+ author: string;
57
+ authorTimestamp: string;
58
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":""}
package/package.json ADDED
@@ -0,0 +1,54 @@
1
+ {
2
+ "name": "@oasissys/bitbucket-cli",
3
+ "version": "0.1.1",
4
+ "packageManager": "pnpm@11.9.0",
5
+ "description": "oasis-bitbucket — AXI CLI for the Oasis Bitbucket Server: repos, branches, and pull requests with token-efficient TOON output",
6
+ "type": "module",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://github.com/oasissys/bitbucket-cli.git"
10
+ },
11
+ "keywords": [
12
+ "bitbucket",
13
+ "cli",
14
+ "agent",
15
+ "axi",
16
+ "toon",
17
+ "oasis"
18
+ ],
19
+ "bin": {
20
+ "oasis-bitbucket": "./dist/bin/oasis-bitbucket.js"
21
+ },
22
+ "files": [
23
+ "dist",
24
+ "skills/bitbucket-cli",
25
+ "LICENSE",
26
+ "README.md"
27
+ ],
28
+ "scripts": {
29
+ "build": "tsc",
30
+ "build:skill": "tsx scripts/build-skill.ts",
31
+ "test": "vitest run",
32
+ "test:watch": "vitest",
33
+ "lint": "eslint .",
34
+ "dev": "tsx bin/oasis-bitbucket.ts",
35
+ "prepublishOnly": "npm run build"
36
+ },
37
+ "license": "MIT",
38
+ "engines": {
39
+ "node": ">=20"
40
+ },
41
+ "devDependencies": {
42
+ "@eslint/js": "^10.0.1",
43
+ "@types/node": "^22.0.0",
44
+ "eslint": "^10.1.0",
45
+ "globals": "^17.4.0",
46
+ "tsx": "^4.0.0",
47
+ "typescript": "^5.7.0",
48
+ "typescript-eslint": "^8.58.0",
49
+ "vitest": "^3.0.0"
50
+ },
51
+ "publishConfig": {
52
+ "access": "public"
53
+ }
54
+ }
@@ -0,0 +1,49 @@
1
+ ---
2
+ name: bitbucket-cli
3
+ description: Browse Oasis Bitbucket (git server) and manage pull requests from the shell — list repos/branches/PRs, read a PR's details and reviewers, review its diff, create a PR, add comments, and merge. Use when the user asks about Bitbucket repos, branches, pull requests, PR reviews, diffs, or wants to open/comment on/merge a PR on the Oasis git server.
4
+ ---
5
+
6
+ # oasis-bitbucket
7
+
8
+ Shell CLI for the Oasis Bitbucket Server (git + pull requests). Auth: `oasis-bitbucket auth --user <u> --password <p>`.
9
+ Invoke as `oasis-bitbucket` (on PATH after a global install; no install: `npx -y @oasissys/bitbucket-cli`). TOON output; exit 0/1/2; every command has `--help`.
10
+
11
+ ## Repo references
12
+
13
+ Repos are addressed as `PROJECT/repo` (project key + repository slug), e.g.
14
+ `OAS_PLS/oasis-common`. `PROJECT` alone addresses a project.
15
+
16
+ ## Commands
17
+
18
+ | Command | What it does |
19
+ |---|---|
20
+ | `oasis-bitbucket (no args)` | live view: your open pull requests (author or reviewer) |
21
+ | `oasis-bitbucket repos <PROJECT> [--fields <l>]` | list repositories in a project |
22
+ | `oasis-bitbucket branches <PROJECT/repo>` | list branches (marks the default) |
23
+ | `oasis-bitbucket prs <PROJECT/repo> [--state <s>] [--fields <l>]` | list pull requests (default OPEN) |
24
+ | `oasis-bitbucket pr <PROJECT/repo> <id>` | PR details, reviewers, and version (needed to merge) |
25
+ | `oasis-bitbucket diff <PROJECT/repo> <id> [--context <n>] [--full]` | unified diff — first 400 lines by default |
26
+ | `oasis-bitbucket create-pr <PROJECT/repo> --title <t> --from <b> --to <b> [--reviewer <s>]...` | open a PR (source branch must be pushed) |
27
+ | `oasis-bitbucket comment <PROJECT/repo> <id> --text <m> [--file <p> --line <n>]` | add a general or inline PR comment |
28
+ | `oasis-bitbucket merge <PROJECT/repo> <id> [--version <n>]` | merge an open PR (version auto-resolved if omitted) |
29
+ | `oasis-bitbucket auth [--user <u> --password <p>]` | configure credentials (no flags = status; --clear = sign out) |
30
+
31
+ ## Examples
32
+
33
+ ```sh
34
+ # Review workflow for a PR
35
+ oasis-bitbucket pr OAS_PLS/oasis-common 681
36
+ oasis-bitbucket diff OAS_PLS/oasis-common 681
37
+ oasis-bitbucket comment OAS_PLS/oasis-common 681 --text "LGTM"
38
+
39
+ # Open a PR
40
+ oasis-bitbucket create-pr OAS_PLS/oasis-common --title "Fix X" --from feature/x --to master --reviewer alsaheb
41
+
42
+ # Merge (version fetched automatically)
43
+ oasis-bitbucket merge OAS_PLS/oasis-common 681
44
+ ```
45
+
46
+ ## Notes
47
+ - `merge` is destructive; version auto-resolves if omitted; already-merged is a no-op.
48
+ - `reviews` = approval count (e.g. `2/3 approved`). Diffs truncated to 400 lines (`--full`).
49
+ - Lists default to a minimal schema; `--fields` adds columns.