gh-axi 0.1.0
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.
- package/LICENSE +21 -0
- package/README.md +46 -0
- package/dist/bin/gh-axg.d.ts +2 -0
- package/dist/bin/gh-axg.js +4 -0
- package/dist/bin/gh-axg.js.map +1 -0
- package/dist/bin/gh-axi.d.ts +2 -0
- package/dist/bin/gh-axi.js +4 -0
- package/dist/bin/gh-axi.js.map +1 -0
- package/dist/src/args.d.ts +16 -0
- package/dist/src/args.js +66 -0
- package/dist/src/args.js.map +1 -0
- package/dist/src/body.d.ts +14 -0
- package/dist/src/body.js +44 -0
- package/dist/src/body.js.map +1 -0
- package/dist/src/cli.d.ts +1 -0
- package/dist/src/cli.js +112 -0
- package/dist/src/cli.js.map +1 -0
- package/dist/src/commands/api.d.ts +3 -0
- package/dist/src/commands/api.js +144 -0
- package/dist/src/commands/api.js.map +1 -0
- package/dist/src/commands/home.d.ts +3 -0
- package/dist/src/commands/home.js +42 -0
- package/dist/src/commands/home.js.map +1 -0
- package/dist/src/commands/issue.d.ts +3 -0
- package/dist/src/commands/issue.js +432 -0
- package/dist/src/commands/issue.js.map +1 -0
- package/dist/src/commands/label.d.ts +3 -0
- package/dist/src/commands/label.js +121 -0
- package/dist/src/commands/label.js.map +1 -0
- package/dist/src/commands/pr.d.ts +3 -0
- package/dist/src/commands/pr.js +544 -0
- package/dist/src/commands/pr.js.map +1 -0
- package/dist/src/commands/release.d.ts +3 -0
- package/dist/src/commands/release.js +209 -0
- package/dist/src/commands/release.js.map +1 -0
- package/dist/src/commands/repo.d.ts +3 -0
- package/dist/src/commands/repo.js +182 -0
- package/dist/src/commands/repo.js.map +1 -0
- package/dist/src/commands/run.d.ts +3 -0
- package/dist/src/commands/run.js +218 -0
- package/dist/src/commands/run.js.map +1 -0
- package/dist/src/commands/search.d.ts +3 -0
- package/dist/src/commands/search.js +295 -0
- package/dist/src/commands/search.js.map +1 -0
- package/dist/src/commands/workflow.d.ts +3 -0
- package/dist/src/commands/workflow.js +126 -0
- package/dist/src/commands/workflow.js.map +1 -0
- package/dist/src/context.d.ts +13 -0
- package/dist/src/context.js +48 -0
- package/dist/src/context.js.map +1 -0
- package/dist/src/errors.d.ts +8 -0
- package/dist/src/errors.js +84 -0
- package/dist/src/errors.js.map +1 -0
- package/dist/src/gh.d.ts +12 -0
- package/dist/src/gh.js +54 -0
- package/dist/src/gh.js.map +1 -0
- package/dist/src/suggestions.d.ts +12 -0
- package/dist/src/suggestions.js +431 -0
- package/dist/src/suggestions.js.map +1 -0
- package/dist/src/toon.d.ts +65 -0
- package/dist/src/toon.js +151 -0
- package/dist/src/toon.js.map +1 -0
- package/package.json +50 -0
package/dist/src/toon.js
ADDED
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import { encode } from '@toon-format/toon';
|
|
2
|
+
export function field(key, as) {
|
|
3
|
+
return { type: 'field', key, as };
|
|
4
|
+
}
|
|
5
|
+
export function pluck(key, subkey, as) {
|
|
6
|
+
return { type: 'pluck', key, subkey, as };
|
|
7
|
+
}
|
|
8
|
+
export function joinArray(key, subkey, as, empty = 'none') {
|
|
9
|
+
return { type: 'joinArray', key, subkey, as, empty };
|
|
10
|
+
}
|
|
11
|
+
export function relativeTime(key, as) {
|
|
12
|
+
return { type: 'relativeTime', key, as };
|
|
13
|
+
}
|
|
14
|
+
export function boolYesNo(key, as) {
|
|
15
|
+
return { type: 'boolYesNo', key, as };
|
|
16
|
+
}
|
|
17
|
+
export function mapEnum(key, map, fallback, as) {
|
|
18
|
+
return { type: 'mapEnum', key, map, fallback, as };
|
|
19
|
+
}
|
|
20
|
+
export function lower(key, as) {
|
|
21
|
+
return { type: 'lower', key, as };
|
|
22
|
+
}
|
|
23
|
+
export function checksSummary(key, as) {
|
|
24
|
+
return { type: 'checksSummary', key, as };
|
|
25
|
+
}
|
|
26
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- custom extractors are polymorphic by design
|
|
27
|
+
export function custom(as, fn) {
|
|
28
|
+
return { type: 'custom', as, fn };
|
|
29
|
+
}
|
|
30
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- items are JSON-parsed objects with dynamic keys
|
|
31
|
+
export function extract(item, schema) {
|
|
32
|
+
const result = {};
|
|
33
|
+
for (const def of schema) {
|
|
34
|
+
const outputKey = def.as ?? ('key' in def ? def.key : def.as);
|
|
35
|
+
switch (def.type) {
|
|
36
|
+
case 'field':
|
|
37
|
+
result[outputKey] = item[def.key] ?? null;
|
|
38
|
+
break;
|
|
39
|
+
case 'pluck':
|
|
40
|
+
result[outputKey] = item[def.key]?.[def.subkey] ?? null;
|
|
41
|
+
break;
|
|
42
|
+
case 'joinArray': {
|
|
43
|
+
const arr = item[def.key];
|
|
44
|
+
if (Array.isArray(arr) && arr.length > 0) {
|
|
45
|
+
result[outputKey] = arr.map((x) => (typeof x === 'string' ? x : x[def.subkey])).join(',');
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
result[outputKey] = def.empty ?? 'none';
|
|
49
|
+
}
|
|
50
|
+
break;
|
|
51
|
+
}
|
|
52
|
+
case 'relativeTime':
|
|
53
|
+
result[outputKey] = formatRelativeTime(item[def.key]);
|
|
54
|
+
break;
|
|
55
|
+
case 'boolYesNo':
|
|
56
|
+
result[outputKey] = item[def.key] ? 'yes' : 'no';
|
|
57
|
+
break;
|
|
58
|
+
case 'mapEnum': {
|
|
59
|
+
const val = item[def.key];
|
|
60
|
+
if (typeof val === 'string' && val !== '' && val in def.map) {
|
|
61
|
+
result[outputKey] = def.map[val];
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
result[outputKey] = def.fallback ?? val ?? 'none';
|
|
65
|
+
}
|
|
66
|
+
break;
|
|
67
|
+
}
|
|
68
|
+
case 'lower':
|
|
69
|
+
result[outputKey] = typeof item[def.key] === 'string' ? item[def.key].toLowerCase() : item[def.key];
|
|
70
|
+
break;
|
|
71
|
+
case 'checksSummary': {
|
|
72
|
+
const checks = item[def.key];
|
|
73
|
+
if (Array.isArray(checks) && checks.length > 0) {
|
|
74
|
+
const passed = checks.filter((c) => c.conclusion === 'SUCCESS' || c.conclusion === 'NEUTRAL').length;
|
|
75
|
+
result[outputKey] = `${passed}/${checks.length} pass`;
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
result[outputKey] = 'none';
|
|
79
|
+
}
|
|
80
|
+
break;
|
|
81
|
+
}
|
|
82
|
+
case 'custom':
|
|
83
|
+
result[outputKey] = def.fn(item);
|
|
84
|
+
break;
|
|
85
|
+
default: {
|
|
86
|
+
const _exhaustive = def;
|
|
87
|
+
throw new Error(`Unknown field type: ${_exhaustive.type}`);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
return result;
|
|
92
|
+
}
|
|
93
|
+
/** Render a labeled list of items as TOON. */
|
|
94
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- items are JSON-parsed objects with dynamic keys
|
|
95
|
+
export function renderList(label, items, schema) {
|
|
96
|
+
const extracted = items.map((item) => extract(item, schema));
|
|
97
|
+
return encode({ [label]: extracted });
|
|
98
|
+
}
|
|
99
|
+
/** Render a single labeled detail object as TOON. */
|
|
100
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- items are JSON-parsed objects with dynamic keys
|
|
101
|
+
export function renderDetail(label, item, schema) {
|
|
102
|
+
const extracted = extract(item, schema);
|
|
103
|
+
return encode({ [label]: extracted });
|
|
104
|
+
}
|
|
105
|
+
/** Render help suggestions (manual formatting — encode() inlines primitive arrays). */
|
|
106
|
+
export function renderHelp(lines) {
|
|
107
|
+
if (lines.length === 0)
|
|
108
|
+
return '';
|
|
109
|
+
const indented = lines.map((l) => ` ${l}`).join('\n');
|
|
110
|
+
return `help[${lines.length}]:\n${indented}`;
|
|
111
|
+
}
|
|
112
|
+
/** Render an error in TOON format. */
|
|
113
|
+
export function renderError(message, code, suggestions = []) {
|
|
114
|
+
const blocks = [encode({ error: message, code })];
|
|
115
|
+
if (suggestions.length > 0) {
|
|
116
|
+
blocks.push(renderHelp(suggestions));
|
|
117
|
+
}
|
|
118
|
+
return blocks.join('\n');
|
|
119
|
+
}
|
|
120
|
+
/** Combine multiple TOON blocks into a single output string. */
|
|
121
|
+
export function renderOutput(blocks) {
|
|
122
|
+
return blocks.filter(Boolean).join('\n');
|
|
123
|
+
}
|
|
124
|
+
function formatRelativeTime(iso) {
|
|
125
|
+
if (!iso)
|
|
126
|
+
return 'unknown';
|
|
127
|
+
const now = Date.now();
|
|
128
|
+
const then = new Date(iso).getTime();
|
|
129
|
+
if (isNaN(then))
|
|
130
|
+
return 'unknown';
|
|
131
|
+
const MS_PER_SECOND = 1000;
|
|
132
|
+
const diffMs = now - then;
|
|
133
|
+
const diffSec = Math.floor(diffMs / MS_PER_SECOND);
|
|
134
|
+
if (diffSec < 60)
|
|
135
|
+
return 'just now';
|
|
136
|
+
const diffMin = Math.floor(diffSec / 60);
|
|
137
|
+
if (diffMin < 60)
|
|
138
|
+
return `${diffMin}m ago`;
|
|
139
|
+
const diffHr = Math.floor(diffMin / 60);
|
|
140
|
+
if (diffHr < 24)
|
|
141
|
+
return `${diffHr}h ago`;
|
|
142
|
+
const diffDay = Math.floor(diffHr / 24);
|
|
143
|
+
if (diffDay < 30)
|
|
144
|
+
return `${diffDay}d ago`;
|
|
145
|
+
const diffMon = Math.floor(diffDay / 30);
|
|
146
|
+
if (diffMon < 12)
|
|
147
|
+
return `${diffMon}mo ago`;
|
|
148
|
+
const diffYr = Math.floor(diffMon / 12);
|
|
149
|
+
return `${diffYr}y ago`;
|
|
150
|
+
}
|
|
151
|
+
//# sourceMappingURL=toon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toon.js","sourceRoot":"","sources":["../../src/toon.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAiB3C,MAAM,UAAU,KAAK,CAAC,GAAW,EAAE,EA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,IAAI,CAAC;IAC1B,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,aAAa,CAAC,CAAC;IACnD,IAAI,OAAO,GAAG,EAAE;QAAE,OAAO,UAAU,CAAC;IACpC,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,EAAE,CAAC,CAAC;IACzC,IAAI,OAAO,GAAG,EAAE;QAAE,OAAO,GAAG,OAAO,OAAO,CAAC;IAC3C,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,EAAE,CAAC,CAAC;IACxC,IAAI,MAAM,GAAG,EAAE;QAAE,OAAO,GAAG,MAAM,OAAO,CAAC;IACzC,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;IACxC,IAAI,OAAO,GAAG,EAAE;QAAE,OAAO,GAAG,OAAO,OAAO,CAAC;IAC3C,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,EAAE,CAAC,CAAC;IACzC,IAAI,OAAO,GAAG,EAAE;QAAE,OAAO,GAAG,OAAO,QAAQ,CAAC;IAC5C,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,EAAE,CAAC,CAAC;IACxC,OAAO,GAAG,MAAM,OAAO,CAAC;AAC1B,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "gh-axi",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "AXI-compliant gh CLI wrapper — token-efficient TOON output, contextual suggestions, idempotent mutations",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/kunchenguid/axg.git",
|
|
9
|
+
"directory": "gh-axi"
|
|
10
|
+
},
|
|
11
|
+
"keywords": [
|
|
12
|
+
"github",
|
|
13
|
+
"cli",
|
|
14
|
+
"agent",
|
|
15
|
+
"axi",
|
|
16
|
+
"toon",
|
|
17
|
+
"gh"
|
|
18
|
+
],
|
|
19
|
+
"bin": {
|
|
20
|
+
"gh-axi": "./dist/bin/gh-axi.js"
|
|
21
|
+
},
|
|
22
|
+
"files": [
|
|
23
|
+
"dist",
|
|
24
|
+
"LICENSE",
|
|
25
|
+
"README.md"
|
|
26
|
+
],
|
|
27
|
+
"publishConfig": {
|
|
28
|
+
"access": "public"
|
|
29
|
+
},
|
|
30
|
+
"scripts": {
|
|
31
|
+
"build": "tsc",
|
|
32
|
+
"test": "vitest run",
|
|
33
|
+
"test:watch": "vitest",
|
|
34
|
+
"dev": "tsx bin/gh-axi.ts",
|
|
35
|
+
"prepublishOnly": "npm run build"
|
|
36
|
+
},
|
|
37
|
+
"license": "MIT",
|
|
38
|
+
"engines": {
|
|
39
|
+
"node": ">=20"
|
|
40
|
+
},
|
|
41
|
+
"dependencies": {
|
|
42
|
+
"@toon-format/toon": "^2.1.0"
|
|
43
|
+
},
|
|
44
|
+
"devDependencies": {
|
|
45
|
+
"@types/node": "^22.0.0",
|
|
46
|
+
"tsx": "^4.0.0",
|
|
47
|
+
"typescript": "^5.7.0",
|
|
48
|
+
"vitest": "^3.0.0"
|
|
49
|
+
}
|
|
50
|
+
}
|