@gaia-ai/conductor 0.6.0 → 0.6.2
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/README.md +1 -1
- package/dist/src/cli/config-schema.d.ts +42 -7
- package/dist/src/cli/config-schema.js +64 -9
- package/dist/src/cli/init.js +16 -10
- package/dist/src/cli/migrate-addon-names.d.ts +82 -0
- package/dist/src/cli/migrate-addon-names.js +351 -0
- package/dist/src/cli/upgrade.d.ts +15 -0
- package/dist/src/cli/upgrade.js +87 -8
- package/dist/src/commands/conductor.d.ts +27 -3
- package/dist/src/commands/conductor.js +39 -52
- package/dist/src/config.d.ts +15 -1
- package/dist/src/config.js +119 -4
- package/dist/src/contract.d.ts +8 -0
- package/dist/src/contract.js +16 -0
- package/dist/src/core/conductor.d.ts +16 -1
- package/dist/src/core/conductor.js +23 -1
- package/dist/src/index.d.ts +6 -4
- package/dist/src/index.js +20 -3
- package/dist/src/plugins/agent.d.ts +61 -0
- package/dist/src/plugins/agent.js +11 -0
- package/dist/src/plugins/executor.d.ts +104 -0
- package/dist/src/plugins/executor.js +1 -0
- package/dist/src/plugins/plugins.d.ts +60 -0
- package/dist/src/plugins/plugins.js +42 -0
- package/dist/src/plugins/preset.d.ts +48 -0
- package/dist/src/plugins/preset.js +23 -0
- package/dist/src/plugins/remote.d.ts +203 -0
- package/dist/src/plugins/remote.js +1 -0
- package/dist/src/plugins/workspace.d.ts +35 -0
- package/dist/src/plugins/workspace.js +1 -0
- package/dist/src/preset.d.ts +2 -2
- package/dist/src/types.d.ts +65 -0
- package/dist/src/types.js +1 -0
- package/package.json +4 -3
- package/dist/src/cli/conductor-registry.d.ts +0 -7
- package/dist/src/cli/conductor-registry.js +0 -6
- package/dist/src/cli/deployment.d.ts +0 -34
- package/dist/src/cli/deployment.js +0 -63
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { type GaiaRemote } from '@gaia-ai/core';
|
|
2
|
-
import type { Command } from 'commander';
|
|
3
|
-
export interface GatherResult {
|
|
4
|
-
range: string;
|
|
5
|
-
resolved: Array<{
|
|
6
|
-
identifier: string;
|
|
7
|
-
uuid: string;
|
|
8
|
-
title: string;
|
|
9
|
-
}>;
|
|
10
|
-
unresolved: string[];
|
|
11
|
-
}
|
|
12
|
-
/** Deduped GAIA-nnn from a git log, in first-seen order. */
|
|
13
|
-
export declare function parseIdentifiers(gitLog: string): string[];
|
|
14
|
-
/**
|
|
15
|
-
* Compute the release batch from a git-log delta: parse GAIA-nnn identifiers and
|
|
16
|
-
* resolve each to a ticket. Unresolved identifiers are reported, never fatal
|
|
17
|
-
* (the resolver returning null is not an error) — GAIA-153 AC-2.
|
|
18
|
-
*/
|
|
19
|
-
export declare function gatherBatch(opts: {
|
|
20
|
-
sinceRef: string;
|
|
21
|
-
toRef: string;
|
|
22
|
-
gitLog: string;
|
|
23
|
-
resolve: (id: string) => Promise<{
|
|
24
|
-
uuid: string;
|
|
25
|
-
title: string;
|
|
26
|
-
} | null>;
|
|
27
|
-
}): Promise<GatherResult>;
|
|
28
|
-
/**
|
|
29
|
-
* Register the `gaia deployment` command group. `tickets` computes the release's
|
|
30
|
-
* tickets (git-log identifier parse + resolve over the given range) and prints
|
|
31
|
-
* them as JSON — pure compute + report, it does not write `referenced_tickets`
|
|
32
|
-
* (the prepare-deployment skill does, via the documented dropsh path).
|
|
33
|
-
*/
|
|
34
|
-
export declare function registerDeployment(program: Command, resolveRemote: () => Promise<GaiaRemote>, resolveProject: () => Promise<string>, cwd: () => string): void;
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { exec } from '@gaia-ai/core';
|
|
2
|
-
/** Deduped GAIA-nnn from a git log, in first-seen order. */
|
|
3
|
-
export function parseIdentifiers(gitLog) {
|
|
4
|
-
const seen = new Set();
|
|
5
|
-
const out = [];
|
|
6
|
-
for (const m of gitLog.matchAll(/\bGAIA-\d+\b/g)) {
|
|
7
|
-
if (!seen.has(m[0])) {
|
|
8
|
-
seen.add(m[0]);
|
|
9
|
-
out.push(m[0]);
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
return out;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Compute the release batch from a git-log delta: parse GAIA-nnn identifiers and
|
|
16
|
-
* resolve each to a ticket. Unresolved identifiers are reported, never fatal
|
|
17
|
-
* (the resolver returning null is not an error) — GAIA-153 AC-2.
|
|
18
|
-
*/
|
|
19
|
-
export async function gatherBatch(opts) {
|
|
20
|
-
const resolved = [];
|
|
21
|
-
const unresolved = [];
|
|
22
|
-
for (const identifier of parseIdentifiers(opts.gitLog)) {
|
|
23
|
-
const hit = await opts.resolve(identifier);
|
|
24
|
-
if (hit) {
|
|
25
|
-
resolved.push({ identifier, ...hit });
|
|
26
|
-
}
|
|
27
|
-
else {
|
|
28
|
-
unresolved.push(identifier);
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
return { range: `${opts.sinceRef}..${opts.toRef}`, resolved, unresolved };
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Register the `gaia deployment` command group. `tickets` computes the release's
|
|
35
|
-
* tickets (git-log identifier parse + resolve over the given range) and prints
|
|
36
|
-
* them as JSON — pure compute + report, it does not write `referenced_tickets`
|
|
37
|
-
* (the prepare-deployment skill does, via the documented dropsh path).
|
|
38
|
-
*/
|
|
39
|
-
export function registerDeployment(program, resolveRemote, resolveProject, cwd) {
|
|
40
|
-
const dep = program
|
|
41
|
-
.command('deployment')
|
|
42
|
-
.description('release / deployment helpers');
|
|
43
|
-
dep
|
|
44
|
-
.command('tickets')
|
|
45
|
-
.description("the release's tickets (git-log identifier parse + resolve over a range) as JSON")
|
|
46
|
-
.requiredOption('--since <ref>', "the env's currently-deployed ref (git range start)")
|
|
47
|
-
.requiredOption('--to <ref>', 'the post-merge env branch tip (git range end)')
|
|
48
|
-
.action(async (opts) => {
|
|
49
|
-
// Prefix each commit with a record separator (%x1e) so one commit's body
|
|
50
|
-
// cannot run into the next commit's header line; the identifier parse is
|
|
51
|
-
// separator-agnostic, but the boundary keeps the log unambiguous.
|
|
52
|
-
const gitLog = await exec('git', ['log', '--format=%x1e%H %s%n%b', `${opts.since}..${opts.to}`], { cwd: cwd() });
|
|
53
|
-
const remote = await resolveRemote();
|
|
54
|
-
const project = await resolveProject();
|
|
55
|
-
const result = await gatherBatch({
|
|
56
|
-
sinceRef: opts.since,
|
|
57
|
-
toRef: opts.to,
|
|
58
|
-
gitLog,
|
|
59
|
-
resolve: (id) => remote.resolveTicketByIdentifier(project, id),
|
|
60
|
-
});
|
|
61
|
-
console.log(JSON.stringify(result));
|
|
62
|
-
});
|
|
63
|
-
}
|