@clipboard-health/groundcrew 4.46.3 → 4.46.5
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/clearance-allow-hosts +1 -0
- package/dist/index.d.ts +4 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/lib/adapterDefinition.d.ts +30 -0
- package/dist/lib/adapterDefinition.d.ts.map +1 -1
- package/dist/lib/adapters/catalog.d.ts +36 -0
- package/dist/lib/adapters/catalog.d.ts.map +1 -0
- package/dist/lib/adapters/catalog.js +42 -0
- package/dist/lib/adapters/linear/client.d.ts.map +1 -1
- package/dist/lib/adapters/linear/client.js +7 -2
- package/dist/lib/adapters/linear/index.d.ts.map +1 -1
- package/dist/lib/adapters/linear/index.js +5 -0
- package/dist/lib/adapters/registry.js +2 -2
- package/dist/lib/adapters/shell/discovery.d.ts +12 -0
- package/dist/lib/adapters/shell/discovery.d.ts.map +1 -1
- package/dist/lib/adapters/shell/discovery.js +15 -0
- package/dist/lib/adapters/shell/index.d.ts.map +1 -1
- package/dist/lib/adapters/shell/index.js +6 -0
- package/dist/lib/adapters/shell/manifest.d.ts +5 -1
- package/dist/lib/adapters/shell/manifest.d.ts.map +1 -1
- package/dist/lib/adapters/shell/manifest.js +17 -1
- package/dist/lib/adapters/shell/manifestAdapter.d.ts +8 -2
- package/dist/lib/adapters/shell/manifestAdapter.d.ts.map +1 -1
- package/dist/lib/adapters/shell/manifestAdapter.js +14 -1
- package/dist/lib/adapters/todo-txt/index.d.ts.map +1 -1
- package/dist/lib/adapters/todo-txt/index.js +4 -0
- package/package.json +4 -4
- package/task-sources/jira/README.md +23 -10
- package/task-sources/jira/source.json +12 -2
package/clearance-allow-hosts
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -14,7 +14,10 @@ export { resolveAgentFor, resolveRepositoryFor, type AgentResolution, type Repos
|
|
|
14
14
|
export { getUsageByAgent, type UsageByAgent } from "./lib/usage.ts";
|
|
15
15
|
export { type Board, createBoard } from "./lib/board.ts";
|
|
16
16
|
export { buildSources, buildSourcesWith } from "./lib/buildSources.ts";
|
|
17
|
-
export type { AdapterContext, AdapterDefinition } from "./lib/adapterDefinition.ts";
|
|
17
|
+
export type { AdapterContext, AdapterDefinition, AdapterMeta, AdapterOrigin, } from "./lib/adapterDefinition.ts";
|
|
18
18
|
export { adapterRegistry, type AdapterLoader, buildRegistry, buildSourceConfigSchema, listAdapterDirectories, } from "./lib/adapters/registry.ts";
|
|
19
|
+
export { listTaskSources, type TaskSourceCatalogEntry } from "./lib/adapters/catalog.ts";
|
|
20
|
+
export { getTaskSourceManifest } from "./lib/adapters/shell/discovery.ts";
|
|
21
|
+
export type { SourceManifest } from "./lib/adapters/shell/manifest.ts";
|
|
19
22
|
export { AmbiguousTaskError, type Blocker as CanonicalBlocker, type BoardState as CanonicalBoardState, type CanonicalStatus, type GroundcrewIssue as CanonicalGroundcrewIssue, type Issue as CanonicalIssue, isGroundcrewIssue as isCanonicalGroundcrewIssue, type ParentSkip as CanonicalParentSkip, type TaskSource, } from "./lib/taskSource.ts";
|
|
20
23
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAC/B,OAAO,EAAE,gBAAgB,EAAE,KAAK,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AAChG,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EACL,kBAAkB,EAClB,KAAK,yBAAyB,GAC/B,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,KAAK,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACnF,OAAO,EAAE,eAAe,EAAE,KAAK,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAC7F,OAAO,EAAE,cAAc,EAAE,KAAK,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAC1F,OAAO,EAAE,MAAM,EAAE,KAAK,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAClE,YAAY,EACV,MAAM,EACN,YAAY,EACZ,eAAe,EACf,eAAe,EACf,cAAc,EACd,YAAY,GACb,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EACL,YAAY,EACZ,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,YAAY,EACZ,cAAc,EACd,KAAK,iBAAiB,EACtB,KAAK,QAAQ,GACd,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,oBAAoB,EACpB,yBAAyB,EACzB,mBAAmB,EACnB,kBAAkB,EAClB,iBAAiB,EACjB,WAAW,EACX,mBAAmB,EACnB,0BAA0B,EAC1B,wBAAwB,EACxB,KAAK,cAAc,GACpB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,eAAe,EACf,oBAAoB,EACpB,KAAK,eAAe,EACpB,KAAK,oBAAoB,GAC1B,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,KAAK,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACpE,OAAO,EAAE,KAAK,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACvE,YAAY,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAC/B,OAAO,EAAE,gBAAgB,EAAE,KAAK,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AAChG,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EACL,kBAAkB,EAClB,KAAK,yBAAyB,GAC/B,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,KAAK,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACnF,OAAO,EAAE,eAAe,EAAE,KAAK,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAC7F,OAAO,EAAE,cAAc,EAAE,KAAK,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAC1F,OAAO,EAAE,MAAM,EAAE,KAAK,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAClE,YAAY,EACV,MAAM,EACN,YAAY,EACZ,eAAe,EACf,eAAe,EACf,cAAc,EACd,YAAY,GACb,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EACL,YAAY,EACZ,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,YAAY,EACZ,cAAc,EACd,KAAK,iBAAiB,EACtB,KAAK,QAAQ,GACd,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,oBAAoB,EACpB,yBAAyB,EACzB,mBAAmB,EACnB,kBAAkB,EAClB,iBAAiB,EACjB,WAAW,EACX,mBAAmB,EACnB,0BAA0B,EAC1B,wBAAwB,EACxB,KAAK,cAAc,GACpB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,eAAe,EACf,oBAAoB,EACpB,KAAK,eAAe,EACpB,KAAK,oBAAoB,GAC1B,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,KAAK,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACpE,OAAO,EAAE,KAAK,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACvE,YAAY,EACV,cAAc,EACd,iBAAiB,EACjB,WAAW,EACX,aAAa,GACd,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,eAAe,EACf,KAAK,aAAa,EAClB,aAAa,EACb,uBAAuB,EACvB,sBAAsB,GACvB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,eAAe,EAAE,KAAK,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACzF,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAC1E,YAAY,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,EACL,kBAAkB,EAClB,KAAK,OAAO,IAAI,gBAAgB,EAChC,KAAK,UAAU,IAAI,mBAAmB,EACtC,KAAK,eAAe,EACpB,KAAK,eAAe,IAAI,wBAAwB,EAChD,KAAK,KAAK,IAAI,cAAc,EAC5B,iBAAiB,IAAI,0BAA0B,EAC/C,KAAK,UAAU,IAAI,mBAAmB,EACtC,KAAK,UAAU,GAChB,MAAM,qBAAqB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -14,4 +14,6 @@ export { getUsageByAgent } from "./lib/usage.js";
|
|
|
14
14
|
export { createBoard } from "./lib/board.js";
|
|
15
15
|
export { buildSources, buildSourcesWith } from "./lib/buildSources.js";
|
|
16
16
|
export { adapterRegistry, buildRegistry, buildSourceConfigSchema, listAdapterDirectories, } from "./lib/adapters/registry.js";
|
|
17
|
+
export { listTaskSources } from "./lib/adapters/catalog.js";
|
|
18
|
+
export { getTaskSourceManifest } from "./lib/adapters/shell/discovery.js";
|
|
17
19
|
export { AmbiguousTaskError, isGroundcrewIssue as isCanonicalGroundcrewIssue, } from "./lib/taskSource.js";
|
|
@@ -16,6 +16,30 @@ import type { TaskSource } from "./taskSource.ts";
|
|
|
16
16
|
export interface AdapterContext {
|
|
17
17
|
readonly globalConfig: ResolvedConfig;
|
|
18
18
|
}
|
|
19
|
+
/**
|
|
20
|
+
* Where an adapter came from. A superset of a manifest's `ManifestOrigin`
|
|
21
|
+
* (`package | user`, see `./adapters/shell/discovery.ts`): code adapters shipped
|
|
22
|
+
* in this package are `builtin`, discovered manifests are `package` (bundled) or
|
|
23
|
+
* `user` (installed under `~/.config/groundcrew/task-sources`).
|
|
24
|
+
*/
|
|
25
|
+
export type AdapterOrigin = "builtin" | "package" | "user";
|
|
26
|
+
/**
|
|
27
|
+
* Descriptive metadata that lets the unified catalog (`./adapters/catalog.ts`)
|
|
28
|
+
* list every enable-by-kind source uniformly, whatever its runtime. Purely the
|
|
29
|
+
* descriptor layer; execution stays per-adapter. The generic `shell` adapter
|
|
30
|
+
* sets `template: true` so it is excluded from the catalog (it is a
|
|
31
|
+
* bring-your-own-scripts escape hatch, not an installable source).
|
|
32
|
+
*/
|
|
33
|
+
export interface AdapterMeta {
|
|
34
|
+
/** One-line human summary shown when enumerating installable sources. */
|
|
35
|
+
readonly description: string;
|
|
36
|
+
/** True when enabling the source needs a secret/token (e.g. an API key). */
|
|
37
|
+
readonly requiresCredentials?: boolean;
|
|
38
|
+
/** True for the generic `shell` escape hatch; excluded from the catalog. */
|
|
39
|
+
readonly template?: boolean;
|
|
40
|
+
/** Provenance of the adapter. */
|
|
41
|
+
readonly origin: AdapterOrigin;
|
|
42
|
+
}
|
|
19
43
|
export interface AdapterDefinition<TSchema extends z.ZodType = z.ZodType> {
|
|
20
44
|
/** Discriminator value used in `SourceConfig.kind`. Must equal the directory name. */
|
|
21
45
|
readonly kind: string;
|
|
@@ -23,5 +47,11 @@ export interface AdapterDefinition<TSchema extends z.ZodType = z.ZodType> {
|
|
|
23
47
|
readonly configSchema: TSchema;
|
|
24
48
|
/** Builds a TaskSource from a validated config and the shared adapter context. */
|
|
25
49
|
readonly create: (config: z.infer<TSchema>, context: AdapterContext) => TaskSource;
|
|
50
|
+
/**
|
|
51
|
+
* Optional descriptive metadata for the unified source catalog. Every
|
|
52
|
+
* built-in and manifest adapter sets it; an adapter without `meta` is simply
|
|
53
|
+
* absent from `listTaskSources()`.
|
|
54
|
+
*/
|
|
55
|
+
readonly meta?: AdapterMeta;
|
|
26
56
|
}
|
|
27
57
|
//# sourceMappingURL=adapterDefinition.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapterDefinition.d.ts","sourceRoot":"","sources":["../../src/lib/adapterDefinition.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAE7B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD;;;;;GAKG;AACH,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,YAAY,EAAE,cAAc,CAAC;CACvC;AAED,MAAM,WAAW,iBAAiB,CAAC,OAAO,SAAS,CAAC,CAAC,OAAO,GAAG,CAAC,CAAC,OAAO;IACtE,sFAAsF;IACtF,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,8FAA8F;IAC9F,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC;IAC/B,kFAAkF;IAClF,QAAQ,CAAC,MAAM,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,cAAc,KAAK,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"adapterDefinition.d.ts","sourceRoot":"","sources":["../../src/lib/adapterDefinition.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAE7B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD;;;;;GAKG;AACH,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,YAAY,EAAE,cAAc,CAAC;CACvC;AAED;;;;;GAKG;AACH,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,SAAS,GAAG,MAAM,CAAC;AAE3D;;;;;;GAMG;AACH,MAAM,WAAW,WAAW;IAC1B,yEAAyE;IACzE,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,4EAA4E;IAC5E,QAAQ,CAAC,mBAAmB,CAAC,EAAE,OAAO,CAAC;IACvC,4EAA4E;IAC5E,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B,iCAAiC;IACjC,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC;CAChC;AAED,MAAM,WAAW,iBAAiB,CAAC,OAAO,SAAS,CAAC,CAAC,OAAO,GAAG,CAAC,CAAC,OAAO;IACtE,sFAAsF;IACtF,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,8FAA8F;IAC9F,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC;IAC/B,kFAAkF;IAClF,QAAQ,CAAC,MAAM,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,cAAc,KAAK,UAAU,CAAC;IACnF;;;;OAIG;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE,WAAW,CAAC;CAC7B"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Unified task-source catalog: one descriptor list over every enable-by-kind
|
|
3
|
+
* source, built-in code adapters (`linear`, `todo-txt`) and discovered manifest
|
|
4
|
+
* sources (`jira`, ...) alike. Only the descriptive layer is unified; execution
|
|
5
|
+
* stays per-adapter (a code adapter is not reimplemented as a shell manifest).
|
|
6
|
+
*
|
|
7
|
+
* Lives above `registry.ts` and `discovery.ts` and imports the registry
|
|
8
|
+
* one-directionally, so putting `listTaskSources` here (rather than in
|
|
9
|
+
* `discovery.ts`, which `registry.ts` already imports) keeps the module graph a
|
|
10
|
+
* DAG. crew-config calls this to enumerate installable sources instead of
|
|
11
|
+
* hardcoding presets.
|
|
12
|
+
*/
|
|
13
|
+
import type { AdapterDefinition, AdapterOrigin } from "../adapterDefinition.ts";
|
|
14
|
+
/**
|
|
15
|
+
* One row of the source catalog. `requiresCredentials` is always concrete (an
|
|
16
|
+
* adapter's optional `meta.requiresCredentials` defaults to `false`) so callers
|
|
17
|
+
* never branch on `undefined`.
|
|
18
|
+
*/
|
|
19
|
+
export interface TaskSourceCatalogEntry {
|
|
20
|
+
readonly name: string;
|
|
21
|
+
readonly description: string;
|
|
22
|
+
readonly origin: AdapterOrigin;
|
|
23
|
+
readonly requiresCredentials: boolean;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Pure projection of a merged registry into catalog rows. Adapters without
|
|
27
|
+
* `meta`, and the generic `shell` template (`meta.template`), are excluded; the
|
|
28
|
+
* template is a bring-your-own-scripts escape hatch, not an installable source.
|
|
29
|
+
*/
|
|
30
|
+
export declare function catalogFromRegistry(registry: Record<string, AdapterDefinition>): TaskSourceCatalogEntry[];
|
|
31
|
+
/**
|
|
32
|
+
* The production catalog: awaits the merged adapter registry (code adapters plus
|
|
33
|
+
* discovered manifest sources) and projects it into catalog rows.
|
|
34
|
+
*/
|
|
35
|
+
export declare function listTaskSources(): Promise<TaskSourceCatalogEntry[]>;
|
|
36
|
+
//# sourceMappingURL=catalog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../../../src/lib/adapters/catalog.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAIhF;;;;GAIG;AACH,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC;IAC/B,QAAQ,CAAC,mBAAmB,EAAE,OAAO,CAAC;CACvC;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,GAC1C,sBAAsB,EAAE,CAe1B;AAED;;;GAGG;AACH,wBAAsB,eAAe,IAAI,OAAO,CAAC,sBAAsB,EAAE,CAAC,CAGzE"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Unified task-source catalog: one descriptor list over every enable-by-kind
|
|
3
|
+
* source, built-in code adapters (`linear`, `todo-txt`) and discovered manifest
|
|
4
|
+
* sources (`jira`, ...) alike. Only the descriptive layer is unified; execution
|
|
5
|
+
* stays per-adapter (a code adapter is not reimplemented as a shell manifest).
|
|
6
|
+
*
|
|
7
|
+
* Lives above `registry.ts` and `discovery.ts` and imports the registry
|
|
8
|
+
* one-directionally, so putting `listTaskSources` here (rather than in
|
|
9
|
+
* `discovery.ts`, which `registry.ts` already imports) keeps the module graph a
|
|
10
|
+
* DAG. crew-config calls this to enumerate installable sources instead of
|
|
11
|
+
* hardcoding presets.
|
|
12
|
+
*/
|
|
13
|
+
import { adapterRegistry } from "./registry.js";
|
|
14
|
+
/**
|
|
15
|
+
* Pure projection of a merged registry into catalog rows. Adapters without
|
|
16
|
+
* `meta`, and the generic `shell` template (`meta.template`), are excluded; the
|
|
17
|
+
* template is a bring-your-own-scripts escape hatch, not an installable source.
|
|
18
|
+
*/
|
|
19
|
+
export function catalogFromRegistry(registry) {
|
|
20
|
+
const entries = [];
|
|
21
|
+
for (const adapter of Object.values(registry)) {
|
|
22
|
+
const { meta } = adapter;
|
|
23
|
+
if (meta === undefined || meta.template === true) {
|
|
24
|
+
continue;
|
|
25
|
+
}
|
|
26
|
+
entries.push({
|
|
27
|
+
name: adapter.kind,
|
|
28
|
+
description: meta.description,
|
|
29
|
+
origin: meta.origin,
|
|
30
|
+
requiresCredentials: meta.requiresCredentials ?? false,
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
return entries;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* The production catalog: awaits the merged adapter registry (code adapters plus
|
|
37
|
+
* discovered manifest sources) and projects it into catalog rows.
|
|
38
|
+
*/
|
|
39
|
+
export async function listTaskSources() {
|
|
40
|
+
const registry = await adapterRegistry;
|
|
41
|
+
return catalogFromRegistry(registry);
|
|
42
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../../src/lib/adapters/linear/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAI3C,QAAA,MAAM,sBAAsB,YAAI,2BAA2B,EAAE,gBAAgB,CAAU,CAAC;AAExF,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,sBAAsB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEzE,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,kBAAkB,CAAC;CAC5B;AAED,wBAAgB,mBAAmB,IAAI,oBAAoB,GAAG,SAAS,
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../../src/lib/adapters/linear/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAI3C,QAAA,MAAM,sBAAsB,YAAI,2BAA2B,EAAE,gBAAgB,CAAU,CAAC;AAExF,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,sBAAsB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEzE,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,kBAAkB,CAAC;CAC5B;AAED,wBAAgB,mBAAmB,IAAI,oBAAoB,GAAG,SAAS,CAatE;AAED,wBAAgB,eAAe,IAAI,YAAY,CAQ9C;AAED;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,YAAY,GAAG,MAAM,YAAY,CAMhF"}
|
|
@@ -4,9 +4,14 @@ const LINEAR_API_KEY_SOURCES = ["GROUNDCREW_LINEAR_API_KEY", "LINEAR_API_KEY"];
|
|
|
4
4
|
export function resolveLinearApiKey() {
|
|
5
5
|
for (const source of LINEAR_API_KEY_SOURCES) {
|
|
6
6
|
const value = readEnvironmentVariable(source);
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
/* v8 ignore next */
|
|
8
|
+
if (value === undefined) {
|
|
9
|
+
continue;
|
|
9
10
|
}
|
|
11
|
+
if (value.length === 0) {
|
|
12
|
+
continue;
|
|
13
|
+
}
|
|
14
|
+
return { value, source };
|
|
10
15
|
}
|
|
11
16
|
return undefined;
|
|
12
17
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/adapters/linear/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAGpE,OAAO,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAC;AAExD,QAAA,MAAM,UAAU,EAAE,iBAAiB,CAAC,OAAO,yBAAyB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/adapters/linear/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAGpE,OAAO,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAC;AAExD,QAAA,MAAM,UAAU,EAAE,iBAAiB,CAAC,OAAO,yBAAyB,CAUnE,CAAC;eAEa,UAAU;AAEzB,YAAY,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -4,5 +4,10 @@ const definition = {
|
|
|
4
4
|
kind: "linear",
|
|
5
5
|
configSchema: linearAdapterConfigSchema,
|
|
6
6
|
create: createLinearTaskSource,
|
|
7
|
+
meta: {
|
|
8
|
+
description: "Pick up Linear issues assigned to your API key's viewer that carry an agent-* label.",
|
|
9
|
+
requiresCredentials: true,
|
|
10
|
+
origin: "builtin",
|
|
11
|
+
},
|
|
7
12
|
};
|
|
8
13
|
export default definition;
|
|
@@ -69,11 +69,11 @@ export function buildSourceConfigSchema(registry) {
|
|
|
69
69
|
*/
|
|
70
70
|
export function mergeManifestAdapters(codeRegistry, discovered) {
|
|
71
71
|
const merged = { ...codeRegistry };
|
|
72
|
-
for (const { manifest, manifestDir } of discovered) {
|
|
72
|
+
for (const { manifest, manifestDir, origin } of discovered) {
|
|
73
73
|
if (codeRegistry[manifest.name]) {
|
|
74
74
|
throw new Error(`Task source "${manifest.name}" collides with the built-in "${manifest.name}" adapter. Rename the source manifest.`);
|
|
75
75
|
}
|
|
76
|
-
merged[manifest.name] = manifestAdapter(manifest, manifestDir);
|
|
76
|
+
merged[manifest.name] = manifestAdapter(manifest, manifestDir, origin);
|
|
77
77
|
}
|
|
78
78
|
return merged;
|
|
79
79
|
}
|
|
@@ -23,5 +23,17 @@ export interface DiscoveryResult {
|
|
|
23
23
|
}
|
|
24
24
|
export declare function discoverFromRoots(roots: readonly ManifestRoot[]): DiscoveryResult;
|
|
25
25
|
export declare function discoverTaskSourceManifests(): DiscoveredManifest[];
|
|
26
|
+
/**
|
|
27
|
+
* Look up a single discovered manifest by name (the enable-by-kind `kind`).
|
|
28
|
+
* Manifest-only: a built-in code adapter (`linear`, `todo-txt`) has no manifest,
|
|
29
|
+
* so this returns `undefined` for those kinds. Part of the public discovery API
|
|
30
|
+
* so crew-config can read a source's install-time hints (prerequisites,
|
|
31
|
+
* secrets) without re-scanning the roots itself.
|
|
32
|
+
*
|
|
33
|
+
* This reads the discovery roots fresh on each call. Prefer
|
|
34
|
+
* `discoverTaskSourceManifests()` when looking up multiple names in one flow so
|
|
35
|
+
* callers only pay the filesystem scan once.
|
|
36
|
+
*/
|
|
37
|
+
export declare function getTaskSourceManifest(name: string): SourceManifest | undefined;
|
|
26
38
|
export {};
|
|
27
39
|
//# sourceMappingURL=discovery.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"discovery.d.ts","sourceRoot":"","sources":["../../../../src/lib/adapters/shell/discovery.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AASH,OAAO,EAAwB,KAAK,cAAc,EAAE,MAAM,eAAe,CAAC;AAE1E,KAAK,cAAc,GAAG,SAAS,GAAG,MAAM,CAAC;AAEzC,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,cAAc,CAAC;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,cAAc,CAAC;CACxB;AAED,MAAM,WAAW,YAAY;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,cAAc,CAAC;CACxB;AAED,MAAM,WAAW,eAAe;IAC9B,SAAS,EAAE,kBAAkB,EAAE,CAAC;IAChC,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AA2BD,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,SAAS,YAAY,EAAE,GAAG,eAAe,CAoCjF;AAED,wBAAgB,2BAA2B,IAAI,kBAAkB,EAAE,CASlE"}
|
|
1
|
+
{"version":3,"file":"discovery.d.ts","sourceRoot":"","sources":["../../../../src/lib/adapters/shell/discovery.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AASH,OAAO,EAAwB,KAAK,cAAc,EAAE,MAAM,eAAe,CAAC;AAE1E,KAAK,cAAc,GAAG,SAAS,GAAG,MAAM,CAAC;AAEzC,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,cAAc,CAAC;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,cAAc,CAAC;CACxB;AAED,MAAM,WAAW,YAAY;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,cAAc,CAAC;CACxB;AAED,MAAM,WAAW,eAAe;IAC9B,SAAS,EAAE,kBAAkB,EAAE,CAAC;IAChC,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AA2BD,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,SAAS,YAAY,EAAE,GAAG,eAAe,CAoCjF;AAED,wBAAgB,2BAA2B,IAAI,kBAAkB,EAAE,CASlE;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,cAAc,GAAG,SAAS,CAG9E"}
|
|
@@ -77,3 +77,18 @@ export function discoverTaskSourceManifests() {
|
|
|
77
77
|
}
|
|
78
78
|
return manifests;
|
|
79
79
|
}
|
|
80
|
+
/**
|
|
81
|
+
* Look up a single discovered manifest by name (the enable-by-kind `kind`).
|
|
82
|
+
* Manifest-only: a built-in code adapter (`linear`, `todo-txt`) has no manifest,
|
|
83
|
+
* so this returns `undefined` for those kinds. Part of the public discovery API
|
|
84
|
+
* so crew-config can read a source's install-time hints (prerequisites,
|
|
85
|
+
* secrets) without re-scanning the roots itself.
|
|
86
|
+
*
|
|
87
|
+
* This reads the discovery roots fresh on each call. Prefer
|
|
88
|
+
* `discoverTaskSourceManifests()` when looking up multiple names in one flow so
|
|
89
|
+
* callers only pay the filesystem scan once.
|
|
90
|
+
*/
|
|
91
|
+
export function getTaskSourceManifest(name) {
|
|
92
|
+
return discoverTaskSourceManifests().find((discovered) => discovered.manifest.name === name)
|
|
93
|
+
?.manifest;
|
|
94
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/adapters/shell/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAGpE,OAAO,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAEvD,QAAA,MAAM,UAAU,EAAE,iBAAiB,CAAC,OAAO,wBAAwB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/adapters/shell/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAGpE,OAAO,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAEvD,QAAA,MAAM,UAAU,EAAE,iBAAiB,CAAC,OAAO,wBAAwB,CAUlE,CAAC;eAEa,UAAU"}
|
|
@@ -4,5 +4,11 @@ const definition = {
|
|
|
4
4
|
kind: "shell",
|
|
5
5
|
configSchema: shellAdapterConfigSchema,
|
|
6
6
|
create: createShellTaskSource,
|
|
7
|
+
meta: {
|
|
8
|
+
description: "Bring-your-own task source wired through shell command templates.",
|
|
9
|
+
// The generic escape hatch, not an installable source: excluded from the catalog.
|
|
10
|
+
template: true,
|
|
11
|
+
origin: "builtin",
|
|
12
|
+
},
|
|
7
13
|
};
|
|
8
14
|
export default definition;
|
|
@@ -34,7 +34,11 @@ export declare const sourceManifestSchema: z.ZodObject<{
|
|
|
34
34
|
files: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
35
35
|
prerequisites: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
36
36
|
bin: z.ZodString;
|
|
37
|
-
install: z.ZodOptional<z.ZodString
|
|
37
|
+
install: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
38
|
+
darwin: z.ZodOptional<z.ZodString>;
|
|
39
|
+
linux: z.ZodOptional<z.ZodString>;
|
|
40
|
+
default: z.ZodOptional<z.ZodString>;
|
|
41
|
+
}, z.core.$strict>]>>;
|
|
38
42
|
setup: z.ZodOptional<z.ZodString>;
|
|
39
43
|
}, z.core.$strict>>>;
|
|
40
44
|
secrets: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../../../src/lib/adapters/shell/manifest.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../../../src/lib/adapters/shell/manifest.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AA2CxB;;;GAGG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;kBASjC,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAa/B,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC"}
|
|
@@ -12,9 +12,25 @@
|
|
|
12
12
|
* bridges the two once the scripts are materialized.
|
|
13
13
|
*/
|
|
14
14
|
import { z } from "zod";
|
|
15
|
+
/**
|
|
16
|
+
* A prerequisite's install hint. A plain string applies to every platform; an
|
|
17
|
+
* object keys hints by Node's `process.platform` value (`darwin`, `linux`) so a
|
|
18
|
+
* consumer can index by platform directly, with `default` as the fallback for
|
|
19
|
+
* platforms without an explicit entry. Only crew-config reads this field, so the
|
|
20
|
+
* per-OS shape stays JSON-serializable and an older crew-config that expects a
|
|
21
|
+
* string simply shows no hint for the object form (a graceful degradation).
|
|
22
|
+
*/
|
|
23
|
+
const installSchema = z.union([
|
|
24
|
+
z.string(),
|
|
25
|
+
z.strictObject({
|
|
26
|
+
darwin: z.string().optional(),
|
|
27
|
+
linux: z.string().optional(),
|
|
28
|
+
default: z.string().optional(),
|
|
29
|
+
}),
|
|
30
|
+
]);
|
|
15
31
|
const prerequisiteSchema = z.strictObject({
|
|
16
32
|
bin: z.string().min(1),
|
|
17
|
-
install:
|
|
33
|
+
install: installSchema.optional(),
|
|
18
34
|
setup: z.string().optional(),
|
|
19
35
|
});
|
|
20
36
|
const secretSchema = z.strictObject({
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* adapter. `create` materializes the scripts (idempotent) before building the
|
|
8
8
|
* TaskSource, so enabling a source is also what installs it.
|
|
9
9
|
*/
|
|
10
|
-
import type { AdapterDefinition } from "../../adapterDefinition.ts";
|
|
10
|
+
import type { AdapterDefinition, AdapterMeta, AdapterOrigin } from "../../adapterDefinition.ts";
|
|
11
11
|
import { type SourceManifest } from "./manifest.ts";
|
|
12
12
|
import type { ShellAdapterConfig } from "./schema.ts";
|
|
13
13
|
export interface ManifestOverrides {
|
|
@@ -16,5 +16,11 @@ export interface ManifestOverrides {
|
|
|
16
16
|
timeouts?: ShellAdapterConfig["timeouts"] | undefined;
|
|
17
17
|
}
|
|
18
18
|
export declare function shellConfigFromManifest(manifest: SourceManifest, overrides?: ManifestOverrides): ShellAdapterConfig;
|
|
19
|
-
|
|
19
|
+
/**
|
|
20
|
+
* Descriptive metadata for the unified catalog, derived from the manifest. A
|
|
21
|
+
* source `requiresCredentials` when it declares any `secrets`; `origin` is where
|
|
22
|
+
* discovery found it (bundled `package` vs. user-installed `user`).
|
|
23
|
+
*/
|
|
24
|
+
export declare function manifestMeta(manifest: SourceManifest, origin: AdapterOrigin): AdapterMeta;
|
|
25
|
+
export declare function manifestAdapter(manifest: SourceManifest, manifestDir: string, origin: AdapterOrigin): AdapterDefinition;
|
|
20
26
|
//# sourceMappingURL=manifestAdapter.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manifestAdapter.d.ts","sourceRoot":"","sources":["../../../../src/lib/adapters/shell/manifestAdapter.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"manifestAdapter.d.ts","sourceRoot":"","sources":["../../../../src/lib/adapters/shell/manifestAdapter.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,KAAK,EAEV,iBAAiB,EACjB,WAAW,EACX,aAAa,EACd,MAAM,4BAA4B,CAAC;AAKpC,OAAO,EAA0B,KAAK,cAAc,EAAE,MAAM,eAAe,CAAC;AAC5E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEtD,MAAM,WAAW,iBAAiB;IAChC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,CAAC;IACzC,QAAQ,CAAC,EAAE,kBAAkB,CAAC,UAAU,CAAC,GAAG,SAAS,CAAC;CACvD;AAED,wBAAgB,uBAAuB,CACrC,QAAQ,EAAE,cAAc,EACxB,SAAS,GAAE,iBAAsB,GAChC,kBAAkB,CAUpB;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,cAAc,EAAE,MAAM,EAAE,aAAa,GAAG,WAAW,CAMzF;AAED,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,cAAc,EACxB,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,aAAa,GACpB,iBAAiB,CA+BnB"}
|
|
@@ -22,7 +22,19 @@ export function shellConfigFromManifest(manifest, overrides = {}) {
|
|
|
22
22
|
...(timeouts ? { timeouts } : {}),
|
|
23
23
|
};
|
|
24
24
|
}
|
|
25
|
-
|
|
25
|
+
/**
|
|
26
|
+
* Descriptive metadata for the unified catalog, derived from the manifest. A
|
|
27
|
+
* source `requiresCredentials` when it declares any `secrets`; `origin` is where
|
|
28
|
+
* discovery found it (bundled `package` vs. user-installed `user`).
|
|
29
|
+
*/
|
|
30
|
+
export function manifestMeta(manifest, origin) {
|
|
31
|
+
return {
|
|
32
|
+
description: manifest.description,
|
|
33
|
+
requiresCredentials: (manifest.secrets?.length ?? 0) > 0,
|
|
34
|
+
origin,
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
export function manifestAdapter(manifest, manifestDir, origin) {
|
|
26
38
|
const configSchema = z.strictObject({
|
|
27
39
|
kind: z.literal(manifest.name),
|
|
28
40
|
name: z
|
|
@@ -47,5 +59,6 @@ export function manifestAdapter(manifest, manifestDir) {
|
|
|
47
59
|
timeouts: overrides.timeouts,
|
|
48
60
|
}), context);
|
|
49
61
|
},
|
|
62
|
+
meta: manifestMeta(manifest, origin),
|
|
50
63
|
};
|
|
51
64
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/adapters/todo-txt/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAGpE,OAAO,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAEzD,QAAA,MAAM,UAAU,EAAE,iBAAiB,CAAC,OAAO,0BAA0B,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/adapters/todo-txt/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAGpE,OAAO,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAEzD,QAAA,MAAM,UAAU,EAAE,iBAAiB,CAAC,OAAO,0BAA0B,CAQpE,CAAC;eAEa,UAAU"}
|
|
@@ -4,5 +4,9 @@ const definition = {
|
|
|
4
4
|
kind: "todo-txt",
|
|
5
5
|
configSchema: todoTxtAdapterConfigSchema,
|
|
6
6
|
create: createTodoTxtTaskSource,
|
|
7
|
+
meta: {
|
|
8
|
+
description: "Track tasks from a local todo.txt file; no credentials required.",
|
|
9
|
+
origin: "builtin",
|
|
10
|
+
},
|
|
7
11
|
};
|
|
8
12
|
export default definition;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@clipboard-health/groundcrew",
|
|
3
|
-
"version": "4.46.
|
|
3
|
+
"version": "4.46.5",
|
|
4
4
|
"description": "Linear-driven orchestrator that launches AI coding agents in git worktrees, with workspace lifecycle and usage tracking.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agent",
|
|
@@ -84,13 +84,13 @@
|
|
|
84
84
|
"@tsconfig/node24": "24.0.4",
|
|
85
85
|
"@tsconfig/strictest": "2.0.8",
|
|
86
86
|
"@types/node": "25.9.4",
|
|
87
|
-
"@typescript/native-preview": "7.0.0-dev.
|
|
87
|
+
"@typescript/native-preview": "7.0.0-dev.20260705.1",
|
|
88
88
|
"@vitest/coverage-v8": "4.1.9",
|
|
89
89
|
"cspell": "10.0.1",
|
|
90
90
|
"dependency-cruiser": "18.0.0",
|
|
91
91
|
"husky": "9.1.7",
|
|
92
92
|
"jscpd": "5.0.11",
|
|
93
|
-
"knip": "6.
|
|
93
|
+
"knip": "6.24.0",
|
|
94
94
|
"lint-staged": "17.0.8",
|
|
95
95
|
"markdownlint-cli2": "0.22.1",
|
|
96
96
|
"nx": "22.7.6",
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
"oxlint": "1.72.0",
|
|
99
99
|
"oxlint-tsgolint": "0.23.0",
|
|
100
100
|
"syncpack": "15.3.2",
|
|
101
|
-
"vite": "8.1.
|
|
101
|
+
"vite": "8.1.3",
|
|
102
102
|
"vitest": "4.1.9"
|
|
103
103
|
},
|
|
104
104
|
"engines": {
|
|
@@ -14,8 +14,20 @@ calls with a subcommand per operation:
|
|
|
14
14
|
|
|
15
15
|
## Prerequisites
|
|
16
16
|
|
|
17
|
-
- [`jira` CLI](https://github.com/ankitpokhrel/jira-cli)
|
|
18
|
-
-
|
|
17
|
+
- [`jira` CLI](https://github.com/ankitpokhrel/jira-cli), then `jira init`:
|
|
18
|
+
- macOS: `brew install ankitpokhrel/jira-cli/jira-cli`
|
|
19
|
+
- Linux (Ubuntu): `sudo snap install jira-cli && sudo snap alias jira-cli jira`
|
|
20
|
+
- [`jq`](https://jqlang.github.io/jq/):
|
|
21
|
+
- macOS: `brew install jq`
|
|
22
|
+
- Linux: `sudo apt-get install jq`
|
|
23
|
+
|
|
24
|
+
The Ubuntu snap ships the binary as `jira-cli`, but the `snap alias` step drops a
|
|
25
|
+
`jira` symlink on PATH, so `jira` is the single canonical command name on every
|
|
26
|
+
platform. That is deliberate: the manifest keeps `bin: "jira"` and
|
|
27
|
+
`setup: "jira init"`, and `jira.sh` keeps invoking the `jira` command verbatim,
|
|
28
|
+
so there is no per-OS binary name to plumb through. If you install the snap without aliasing,
|
|
29
|
+
the `jira` prerequisite probe fails and the setup screen surfaces this install
|
|
30
|
+
hint, which now includes the alias step.
|
|
19
31
|
|
|
20
32
|
> **Note:** `list` and `get` detect "no results" and "not found" by matching the
|
|
21
33
|
> `jira` CLI's stderr wording (it exposes no machine-readable signal for either).
|
|
@@ -74,9 +86,10 @@ the token on per invocation.
|
|
|
74
86
|
| `groundcrew` | `groundcrew` | Opts the issue in. The default JQL fetches only issues carrying this label, so work is dispatched explicitly rather than every open issue being swept up. The label name is just a JQL convention — change the `labels = …` clause in `JIRA_GROUNDCREW_JQL` to use a different one. |
|
|
75
87
|
| `repo:<name>` | `repo:wild-horses` | Sets `repository: "wild-horses"`. Use a bare repository name when your config's `knownRepositories` lists it by name — no owner needed. |
|
|
76
88
|
| `repo:<Owner>__<name>` | `repo:ClipboardHealth__groundcrew` | Sets `repository: "ClipboardHealth/groundcrew"`. JIRA labels cannot contain `/`, so the slash is encoded as exactly **two** underscores (`__`). Every `__` decodes to `/`, so only two-component `Owner/name` repos are supported — a repository whose owner or name itself contains `__` cannot be expressed. |
|
|
77
|
-
| `agent:<name>` | `agent:claude` |
|
|
89
|
+
| `agent:<name>` | `agent:claude` | Sets `agent: "claude"`. Omit it only when `JIRA_DEFAULT_AGENT` is configured separately; the shipped source leaves that default empty so unlabeled issues are listed but not auto-dispatched. |
|
|
78
90
|
|
|
79
|
-
So a typical dispatchable issue carries
|
|
91
|
+
So a typical dispatchable issue carries `groundcrew` + a `repo:` label + an
|
|
92
|
+
`agent:` label.
|
|
80
93
|
An issue without a `repo:` label is listed but not dispatchable (and with no
|
|
81
94
|
`agent:` label and no `JIRA_DEFAULT_AGENT`, its agent is `null`).
|
|
82
95
|
|
|
@@ -96,9 +109,9 @@ the token on per invocation.
|
|
|
96
109
|
},
|
|
97
110
|
"env": {
|
|
98
111
|
"JIRA_GROUNDCREW_JQL": "labels = groundcrew AND (statusCategory != Done OR (statusCategory = Done AND updated >= -7d))",
|
|
99
|
-
"JIRA_REVIEW_PATTERN": "
|
|
100
|
-
"JIRA_TODO_PATTERN": "",
|
|
101
|
-
"JIRA_DEFAULT_AGENT": "
|
|
112
|
+
"JIRA_REVIEW_PATTERN": "In Review",
|
|
113
|
+
"JIRA_TODO_PATTERN": "New",
|
|
114
|
+
"JIRA_DEFAULT_AGENT": "",
|
|
102
115
|
"JIRA_STATE_IN_PROGRESS": "In Progress",
|
|
103
116
|
"JIRA_STATE_IN_REVIEW": "In Review",
|
|
104
117
|
"JIRA_STATE_DONE": "Done"
|
|
@@ -118,9 +131,9 @@ The script reads these from the source's `env` block:
|
|
|
118
131
|
| Variable | Default | Purpose |
|
|
119
132
|
| --------------------- | ------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
120
133
|
| `JIRA_GROUNDCREW_JQL` | `labels = groundcrew AND (statusCategory != Done OR (statusCategory = Done AND updated >= -7d))` | Which issues `list` returns, capped at the first 20 (`--paginate 0:20` in `jira.sh`). Defaults to open issues plus those done in the last 7 days (so groundcrew can clean up their worktrees). Omit `ORDER BY` (jira-cli adds its own). |
|
|
121
|
-
| `JIRA_REVIEW_PATTERN` | `
|
|
122
|
-
| `JIRA_TODO_PATTERN` |
|
|
123
|
-
| `JIRA_DEFAULT_AGENT` | _(empty -> `null`)_ | Agent used when an issue has no `agent:` label.
|
|
134
|
+
| `JIRA_REVIEW_PATTERN` | `In Review` | Case-insensitive regex; matching In-Progress status names map to `in-review`. |
|
|
135
|
+
| `JIRA_TODO_PATTERN` | `New` | Case-insensitive regex; matching In-Progress status names map to `todo` so groundcrew dispatches them as new work. The shipped source seeds `New`; clear the row to turn this off. Checked before `JIRA_REVIEW_PATTERN`. |
|
|
136
|
+
| `JIRA_DEFAULT_AGENT` | _(empty -> `null`)_ | Agent used when an issue has no `agent:` label. Set it to an agent name only when every matching Jira issue should be eligible for that agent by default. |
|
|
124
137
|
| `JIRA_TOKEN_FILE` | `~/.config/groundcrew/jira.token` | Token file path. |
|
|
125
138
|
| `JIRA_STATE_*` | `In Progress` / `In Review` / `Done` | Native JIRA state names used by `move`. Match your project's workflow. |
|
|
126
139
|
|
|
@@ -7,12 +7,18 @@
|
|
|
7
7
|
"prerequisites": [
|
|
8
8
|
{
|
|
9
9
|
"bin": "jira",
|
|
10
|
-
"install":
|
|
10
|
+
"install": {
|
|
11
|
+
"darwin": "brew install ankitpokhrel/jira-cli/jira-cli",
|
|
12
|
+
"linux": "sudo snap install jira-cli && sudo snap alias jira-cli jira"
|
|
13
|
+
},
|
|
11
14
|
"setup": "jira init"
|
|
12
15
|
},
|
|
13
16
|
{
|
|
14
17
|
"bin": "jq",
|
|
15
|
-
"install":
|
|
18
|
+
"install": {
|
|
19
|
+
"darwin": "brew install jq",
|
|
20
|
+
"linux": "sudo apt-get install jq"
|
|
21
|
+
}
|
|
16
22
|
}
|
|
17
23
|
],
|
|
18
24
|
"secrets": [
|
|
@@ -24,6 +30,10 @@
|
|
|
24
30
|
}
|
|
25
31
|
],
|
|
26
32
|
"env": {
|
|
33
|
+
"JIRA_GROUNDCREW_JQL": "labels = groundcrew AND (statusCategory != Done OR (statusCategory = Done AND updated >= -7d))",
|
|
34
|
+
"JIRA_REVIEW_PATTERN": "In Review",
|
|
35
|
+
"JIRA_TODO_PATTERN": "New",
|
|
36
|
+
"JIRA_DEFAULT_AGENT": "",
|
|
27
37
|
"JIRA_STATE_IN_PROGRESS": "In Progress",
|
|
28
38
|
"JIRA_STATE_IN_REVIEW": "In Review",
|
|
29
39
|
"JIRA_STATE_DONE": "Done"
|