@agentteams/cli 0.1.91 → 0.1.92
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/.eslintcache +1 -1
- package/README.md +36 -0
- package/dist/api/codeReview.d.ts.map +1 -1
- package/dist/api/codeReview.js +4 -2
- package/dist/api/codeReview.js.map +1 -1
- package/dist/api/convention.d.ts.map +1 -1
- package/dist/api/convention.js +3 -1
- package/dist/api/convention.js.map +1 -1
- package/dist/api/linear.d.ts.map +1 -1
- package/dist/api/linear.js +3 -1
- package/dist/api/linear.js.map +1 -1
- package/dist/api/task.js +1 -1
- package/dist/api/task.js.map +1 -1
- package/dist/commands/document.d.ts +11 -0
- package/dist/commands/document.d.ts.map +1 -1
- package/dist/commands/document.js +37 -12
- package/dist/commands/document.js.map +1 -1
- package/dist/commands/index.d.ts.map +1 -1
- package/dist/commands/index.js +19 -0
- package/dist/commands/index.js.map +1 -1
- package/dist/commands/resolve.d.ts +30 -0
- package/dist/commands/resolve.d.ts.map +1 -0
- package/dist/commands/resolve.js +166 -0
- package/dist/commands/resolve.js.map +1 -0
- package/dist/index.js +31 -0
- package/dist/index.js.map +1 -1
- package/dist/utils/entityId.d.ts.map +1 -1
- package/dist/utils/entityId.js +18 -5
- package/dist/utils/entityId.js.map +1 -1
- package/dist/utils/entityRef.d.ts +52 -0
- package/dist/utils/entityRef.d.ts.map +1 -0
- package/dist/utils/entityRef.js +259 -0
- package/dist/utils/entityRef.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
import { stripEntityIdPrefix } from './entityId.js';
|
|
2
|
+
/**
|
|
3
|
+
* Canonical prefix codes mirror `cli/src/utils/entityId.ts` and
|
|
4
|
+
* `web/src/lib/entityId.ts` (`entityPrefixByType`). The codes live here because
|
|
5
|
+
* the shared `stripEntityIdPrefix` only removes a prefix — it cannot tell which
|
|
6
|
+
* type a prefix belongs to, which is exactly what reverse inference needs.
|
|
7
|
+
* Stripping itself is always delegated, never re-implemented.
|
|
8
|
+
*/
|
|
9
|
+
const ENTITY_REF_DESCRIPTORS = [
|
|
10
|
+
{ refType: 'plan', prefixCode: 'pln', kind: 'file', resolver: 'agentteams plan download --id <id>' },
|
|
11
|
+
{ refType: 'completionReport', prefixCode: 'rpt', kind: 'file', resolver: 'agentteams report download --id <id>' },
|
|
12
|
+
{ refType: 'postMortem', prefixCode: 'pmt', kind: 'file', resolver: 'agentteams postmortem download --id <id>' },
|
|
13
|
+
{ refType: 'coAction', prefixCode: 'act', kind: 'file', resolver: 'agentteams coaction download --id <id>' },
|
|
14
|
+
{ refType: 'document', prefixCode: 'doc', kind: 'file', resolver: 'agentteams document download --id <id>' },
|
|
15
|
+
{ refType: 'codeReview', prefixCode: 'rev', kind: 'record', resolver: 'agentteams code-review get --id <id>' },
|
|
16
|
+
{
|
|
17
|
+
refType: 'codeReviewFinding',
|
|
18
|
+
prefixCode: 'rvf',
|
|
19
|
+
kind: 'record',
|
|
20
|
+
resolver: 'agentteams code-review get --finding-id <id>',
|
|
21
|
+
},
|
|
22
|
+
{ refType: 'planTask', prefixCode: 'tsk', kind: 'record', resolver: 'agentteams task get --task-id <id>' },
|
|
23
|
+
{
|
|
24
|
+
refType: 'convention',
|
|
25
|
+
prefixCode: 'cnv',
|
|
26
|
+
// A convention reference usually carries the local path it was deployed to,
|
|
27
|
+
// so the default resolution is a local read; the id-only form falls back to
|
|
28
|
+
// a server fetch (see `resolveConventionKind`).
|
|
29
|
+
kind: 'localFile',
|
|
30
|
+
resolver: 'read the local path from the reference',
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
refType: 'LINEAR_ISSUE',
|
|
34
|
+
kind: 'record',
|
|
35
|
+
external: true,
|
|
36
|
+
resolver: 'agentteams linear issue get --issue-id <id>',
|
|
37
|
+
},
|
|
38
|
+
{ refType: 'GITHUB_ISSUE', kind: 'external', external: true, resolver: 'gh issue view <number> --repo <owner/repo>' },
|
|
39
|
+
{ refType: 'GITHUB_PR', kind: 'external', external: true, resolver: 'gh pr view <number> --repo <owner/repo>' },
|
|
40
|
+
{
|
|
41
|
+
refType: 'GITLAB_ISSUE',
|
|
42
|
+
kind: 'external',
|
|
43
|
+
external: true,
|
|
44
|
+
resolver: 'glab issue view <iid> --repo <projectPath>',
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
refType: 'GITLAB_MERGE_REQUEST',
|
|
48
|
+
kind: 'external',
|
|
49
|
+
external: true,
|
|
50
|
+
resolver: 'glab mr view <iid> --repo <projectPath>',
|
|
51
|
+
},
|
|
52
|
+
{ refType: 'BITBUCKET_ISSUE', kind: 'external', external: true, resolver: 'open the issue URL' },
|
|
53
|
+
{ refType: 'BITBUCKET_PR', kind: 'external', external: true, resolver: 'open the pull request URL' },
|
|
54
|
+
];
|
|
55
|
+
const descriptorByRefType = new Map(ENTITY_REF_DESCRIPTORS.map((descriptor) => [descriptor.refType.toLowerCase(), descriptor]));
|
|
56
|
+
const descriptorByPrefixCode = new Map(ENTITY_REF_DESCRIPTORS.filter((descriptor) => descriptor.prefixCode).map((descriptor) => [
|
|
57
|
+
descriptor.prefixCode,
|
|
58
|
+
descriptor,
|
|
59
|
+
]));
|
|
60
|
+
export const SUPPORTED_REF_FORMS = [
|
|
61
|
+
'type:id (e.g. plan:agentteams_pln_<uuid>)',
|
|
62
|
+
'type:id:path (convention:<id>:.agentteams/rules/context.md)',
|
|
63
|
+
'parent:child (codeReview:<reviewId>:<findingId>, plan:<planId>:<taskId>)',
|
|
64
|
+
'bare prefixed id (agentteams_doc_<uuid>)',
|
|
65
|
+
'external marker (LINEAR_ISSUE:<uuid>, GITHUB_ISSUE:<owner/repo#n>, GITHUB_PR, GITLAB_ISSUE, GITLAB_MERGE_REQUEST, BITBUCKET_ISSUE, BITBUCKET_PR)',
|
|
66
|
+
'a whole markdown link wrapping any of the above ([label](type:id))',
|
|
67
|
+
].join('; ');
|
|
68
|
+
const SUPPORTED_REF_TYPES = ENTITY_REF_DESCRIPTORS.map((descriptor) => descriptor.refType).join(', ');
|
|
69
|
+
function unsupported(input, reason) {
|
|
70
|
+
return new Error(`Unsupported entity reference: ${input} (${reason}). Supported forms: ${SUPPORTED_REF_FORMS}. Supported types: ${SUPPORTED_REF_TYPES}. A plain https link is not an entity reference — open the URL directly.`);
|
|
71
|
+
}
|
|
72
|
+
const MARKDOWN_LINK_PATTERN = /^\[([^\]]*)\]\((.+)\)$/;
|
|
73
|
+
const PREFIXED_ID_PATTERN = /^agentteams_([a-z]{3})_(.+)$/;
|
|
74
|
+
/**
|
|
75
|
+
* Every AgentTeams entity id is a bare UUID (mirrors `uuidBodyPattern` in
|
|
76
|
+
* `web/src/lib/entityId.ts`). References arrive from user-authored text, and a
|
|
77
|
+
* parsed id is interpolated straight into an API path, so anything that is not
|
|
78
|
+
* a UUID is rejected here rather than sent to the server. External markers are
|
|
79
|
+
* exempt — their locators are not AgentTeams ids.
|
|
80
|
+
*/
|
|
81
|
+
const ENTITY_UUID_PATTERN = /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/;
|
|
82
|
+
/** Sentinel host the web editor uses when a reference has no real web URL. */
|
|
83
|
+
const ENTITY_REF_SENTINEL_HOST = '__entity_ref__';
|
|
84
|
+
/**
|
|
85
|
+
* Unwrap the layers a reference can arrive in — a whole markdown link and/or
|
|
86
|
+
* the `https://__entity_ref__/<encoded token>` URL the editor serializes — down
|
|
87
|
+
* to the bare `type:id` token.
|
|
88
|
+
*/
|
|
89
|
+
function unwrapRefTarget(input) {
|
|
90
|
+
const linkMatch = input.match(MARKDOWN_LINK_PATTERN);
|
|
91
|
+
const label = linkMatch?.[1]?.trim() || undefined;
|
|
92
|
+
let target = (linkMatch?.[2] ?? input).trim();
|
|
93
|
+
if (target.startsWith(`https://${ENTITY_REF_SENTINEL_HOST}/`) ||
|
|
94
|
+
target.startsWith(`http://${ENTITY_REF_SENTINEL_HOST}/`)) {
|
|
95
|
+
const encoded = target.slice(target.indexOf(ENTITY_REF_SENTINEL_HOST) + ENTITY_REF_SENTINEL_HOST.length + 1);
|
|
96
|
+
target = decodeURIComponent(encoded).trim();
|
|
97
|
+
}
|
|
98
|
+
return { target, label };
|
|
99
|
+
}
|
|
100
|
+
function buildExternalTarget(refType, locator) {
|
|
101
|
+
const hashIndex = locator.lastIndexOf('#');
|
|
102
|
+
const bangIndex = locator.lastIndexOf('!');
|
|
103
|
+
if (refType === 'GITHUB_ISSUE' || refType === 'GITHUB_PR') {
|
|
104
|
+
if (hashIndex <= 0)
|
|
105
|
+
return {};
|
|
106
|
+
const repo = locator.slice(0, hashIndex);
|
|
107
|
+
const number = locator.slice(hashIndex + 1);
|
|
108
|
+
const segment = refType === 'GITHUB_ISSUE' ? 'issues' : 'pull';
|
|
109
|
+
const command = refType === 'GITHUB_ISSUE' ? 'issue' : 'pr';
|
|
110
|
+
return {
|
|
111
|
+
url: `https://github.com/${repo}/${segment}/${number}`,
|
|
112
|
+
suggestedCommand: `gh ${command} view ${number} --repo ${repo}`,
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
if (refType === 'GITLAB_ISSUE' || refType === 'GITLAB_MERGE_REQUEST') {
|
|
116
|
+
const separatorIndex = refType === 'GITLAB_ISSUE' ? hashIndex : bangIndex;
|
|
117
|
+
if (separatorIndex <= 0)
|
|
118
|
+
return {};
|
|
119
|
+
const projectPath = locator.slice(0, separatorIndex);
|
|
120
|
+
const iid = locator.slice(separatorIndex + 1);
|
|
121
|
+
const command = refType === 'GITLAB_ISSUE' ? 'issue' : 'mr';
|
|
122
|
+
// No url: the GitLab host can be self-managed and is not derivable from the
|
|
123
|
+
// project path, so `glab` (which reads the configured host) is the answer.
|
|
124
|
+
return { suggestedCommand: `glab ${command} view ${iid} --repo ${projectPath}` };
|
|
125
|
+
}
|
|
126
|
+
if (refType === 'BITBUCKET_ISSUE' || refType === 'BITBUCKET_PR') {
|
|
127
|
+
if (hashIndex <= 0)
|
|
128
|
+
return {};
|
|
129
|
+
const repo = locator.slice(0, hashIndex);
|
|
130
|
+
const id = locator.slice(hashIndex + 1);
|
|
131
|
+
const segment = refType === 'BITBUCKET_ISSUE' ? 'issues' : 'pull-requests';
|
|
132
|
+
return { url: `https://bitbucket.org/${repo}/${segment}/${id}` };
|
|
133
|
+
}
|
|
134
|
+
return {};
|
|
135
|
+
}
|
|
136
|
+
function buildFallbackCommand(descriptor, parsed) {
|
|
137
|
+
return descriptor.resolver.replace('<id>', parsed.id);
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* A `convention:<id>` reference without a path cannot be read locally, so it
|
|
141
|
+
* degrades to a server fetch instead of the usual local read.
|
|
142
|
+
*/
|
|
143
|
+
function resolveConventionKind(path) {
|
|
144
|
+
return path ? 'localFile' : 'record';
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Parse an entity reference token into the type, bare id, and resolution kind.
|
|
148
|
+
* Pure: no filesystem, no network.
|
|
149
|
+
*/
|
|
150
|
+
export function parseEntityRef(input) {
|
|
151
|
+
if (typeof input !== 'string' || input.trim().length === 0) {
|
|
152
|
+
throw unsupported(String(input), 'empty reference');
|
|
153
|
+
}
|
|
154
|
+
const raw = input.trim();
|
|
155
|
+
const { target, label } = unwrapRefTarget(raw);
|
|
156
|
+
if (target.length === 0) {
|
|
157
|
+
throw unsupported(raw, 'empty reference target');
|
|
158
|
+
}
|
|
159
|
+
const prefixedMatch = target.match(PREFIXED_ID_PATTERN);
|
|
160
|
+
if (prefixedMatch) {
|
|
161
|
+
const descriptor = descriptorByPrefixCode.get(prefixedMatch[1]);
|
|
162
|
+
if (!descriptor) {
|
|
163
|
+
throw unsupported(raw, `unknown id prefix agentteams_${prefixedMatch[1]}_`);
|
|
164
|
+
}
|
|
165
|
+
const id = stripEntityIdPrefix(target);
|
|
166
|
+
return finalize({ raw, label, descriptor, id });
|
|
167
|
+
}
|
|
168
|
+
const typeSeparator = target.indexOf(':');
|
|
169
|
+
if (typeSeparator <= 0) {
|
|
170
|
+
throw unsupported(raw, 'no type could be determined');
|
|
171
|
+
}
|
|
172
|
+
const typeToken = target.slice(0, typeSeparator);
|
|
173
|
+
const rest = target.slice(typeSeparator + 1).trim();
|
|
174
|
+
const descriptor = descriptorByRefType.get(typeToken.toLowerCase());
|
|
175
|
+
if (!descriptor) {
|
|
176
|
+
throw unsupported(raw, `unknown reference type "${typeToken}"`);
|
|
177
|
+
}
|
|
178
|
+
if (rest.length === 0) {
|
|
179
|
+
throw unsupported(raw, 'reference has no id');
|
|
180
|
+
}
|
|
181
|
+
// External locators (`owner/repo#12`, `group/project!7`) never contain a
|
|
182
|
+
// colon, so they are taken whole rather than split further.
|
|
183
|
+
if (descriptor.external) {
|
|
184
|
+
return finalize({ raw, label, descriptor, id: rest, skipPrefixStrip: true });
|
|
185
|
+
}
|
|
186
|
+
const idSeparator = rest.indexOf(':');
|
|
187
|
+
const idPart = idSeparator === -1 ? rest : rest.slice(0, idSeparator).trim();
|
|
188
|
+
const thirdPart = idSeparator === -1 ? undefined : rest.slice(idSeparator + 1).trim();
|
|
189
|
+
if (idPart.length === 0) {
|
|
190
|
+
throw unsupported(raw, 'reference has no id');
|
|
191
|
+
}
|
|
192
|
+
if (thirdPart === undefined) {
|
|
193
|
+
return finalize({ raw, label, descriptor, id: idPart });
|
|
194
|
+
}
|
|
195
|
+
if (thirdPart.length === 0) {
|
|
196
|
+
throw unsupported(raw, 'three-part reference has an empty third segment');
|
|
197
|
+
}
|
|
198
|
+
// The same three-part grammar carries a local path for conventions and a
|
|
199
|
+
// child id for code reviews and plans, so the parent type decides.
|
|
200
|
+
if (descriptor.refType === 'convention') {
|
|
201
|
+
return finalize({ raw, label, descriptor, id: idPart, path: thirdPart });
|
|
202
|
+
}
|
|
203
|
+
if (descriptor.refType === 'codeReview') {
|
|
204
|
+
return finalize({
|
|
205
|
+
raw,
|
|
206
|
+
label,
|
|
207
|
+
descriptor: descriptorByRefType.get('codereviewfinding'),
|
|
208
|
+
id: thirdPart,
|
|
209
|
+
parentId: stripEntityIdPrefix(idPart),
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
if (descriptor.refType === 'plan') {
|
|
213
|
+
return finalize({
|
|
214
|
+
raw,
|
|
215
|
+
label,
|
|
216
|
+
descriptor: descriptorByRefType.get('plantask'),
|
|
217
|
+
id: thirdPart,
|
|
218
|
+
parentId: stripEntityIdPrefix(idPart),
|
|
219
|
+
});
|
|
220
|
+
}
|
|
221
|
+
throw unsupported(raw, `three-part references are not supported for type "${descriptor.refType}"`);
|
|
222
|
+
}
|
|
223
|
+
function finalize(input) {
|
|
224
|
+
const { raw, label, descriptor, parentId, path, skipPrefixStrip } = input;
|
|
225
|
+
const id = skipPrefixStrip ? input.id : stripEntityIdPrefix(input.id);
|
|
226
|
+
if (descriptor.prefixCode) {
|
|
227
|
+
if (!ENTITY_UUID_PATTERN.test(id)) {
|
|
228
|
+
throw unsupported(raw, `"${id}" is not a valid ${descriptor.refType} id (expected a UUID)`);
|
|
229
|
+
}
|
|
230
|
+
if (parentId !== undefined && !ENTITY_UUID_PATTERN.test(parentId)) {
|
|
231
|
+
throw unsupported(raw, `"${parentId}" is not a valid parent id (expected a UUID)`);
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
const kind = descriptor.refType === 'convention' ? resolveConventionKind(path) : descriptor.kind;
|
|
235
|
+
const external = descriptor.external === true;
|
|
236
|
+
const { url, suggestedCommand } = external ? buildExternalTarget(descriptor.refType, id) : {};
|
|
237
|
+
const parsed = {
|
|
238
|
+
raw,
|
|
239
|
+
refType: descriptor.refType,
|
|
240
|
+
id,
|
|
241
|
+
kind,
|
|
242
|
+
external,
|
|
243
|
+
// A derived `gh`/`glab` invocation is strictly more useful than the generic
|
|
244
|
+
// template, so it doubles as the fallback for SCM references.
|
|
245
|
+
fallbackCommand: suggestedCommand ?? buildFallbackCommand(descriptor, { id }),
|
|
246
|
+
};
|
|
247
|
+
if (label)
|
|
248
|
+
parsed.label = label;
|
|
249
|
+
if (parentId)
|
|
250
|
+
parsed.parentId = parentId;
|
|
251
|
+
if (path)
|
|
252
|
+
parsed.path = path;
|
|
253
|
+
if (url)
|
|
254
|
+
parsed.url = url;
|
|
255
|
+
if (suggestedCommand)
|
|
256
|
+
parsed.suggestedCommand = suggestedCommand;
|
|
257
|
+
return parsed;
|
|
258
|
+
}
|
|
259
|
+
//# sourceMappingURL=entityRef.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entityRef.js","sourceRoot":"","sources":["../../src/utils/entityRef.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAkDpD;;;;;;GAMG;AACH,MAAM,sBAAsB,GAA0B;IACpD,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,oCAAoC,EAAE;IACpG,EAAE,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,sCAAsC,EAAE;IAClH,EAAE,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,0CAA0C,EAAE;IAChH,EAAE,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,wCAAwC,EAAE;IAC5G,EAAE,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,wCAAwC,EAAE;IAC5G,EAAE,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,sCAAsC,EAAE;IAC9G;QACE,OAAO,EAAE,mBAAmB;QAC5B,UAAU,EAAE,KAAK;QACjB,IAAI,EAAE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