@clipboard-health/groundcrew 4.46.3 → 4.46.4
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 +6 -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/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 +3 -3
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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,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,MA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,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,CAYtE;AAED,wBAAgB,eAAe,IAAI,YAAY,CAQ9C;AAED;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,YAAY,GAAG,MAAM,YAAY,CAMhF"}
|
|
@@ -4,9 +4,13 @@ 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
|
-
if (value
|
|
8
|
-
|
|
7
|
+
if (value === undefined) {
|
|
8
|
+
continue;
|
|
9
9
|
}
|
|
10
|
+
if (value.length === 0) {
|
|
11
|
+
continue;
|
|
12
|
+
}
|
|
13
|
+
return { value, source };
|
|
10
14
|
}
|
|
11
15
|
return undefined;
|
|
12
16
|
}
|
|
@@ -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;
|
|
@@ -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.4",
|
|
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",
|
|
@@ -90,7 +90,7 @@
|
|
|
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": {
|