@gaia-ai/conductor 0.5.5 → 0.6.1
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 +89 -0
- package/dist/src/cli/config-schema.js +146 -0
- package/dist/src/cli/init.d.ts +31 -33
- package/dist/src/cli/init.js +106 -84
- package/dist/src/cli/migrate-addon-names.d.ts +72 -0
- package/dist/src/cli/migrate-addon-names.js +318 -0
- package/dist/src/cli/upgrade.d.ts +53 -0
- package/dist/src/cli/upgrade.js +222 -0
- package/dist/src/cli/version-check.js +5 -1
- package/dist/src/commands/conductor.d.ts +57 -0
- package/dist/src/{cli/gaia.js → commands/conductor.js} +107 -215
- package/dist/src/config.d.ts +65 -24
- package/dist/src/config.js +405 -154
- 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 +28 -9
- package/dist/src/index.d.ts +7 -5
- package/dist/src/index.js +26 -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 -0
- package/dist/src/preset.js +8 -0
- package/dist/src/types.d.ts +65 -0
- package/dist/src/types.js +1 -0
- package/package.json +8 -5
- package/dist/src/cli/gaia.d.ts +0 -23
- package/dist/src/cli/local-registry.d.ts +0 -14
- package/dist/src/cli/local-registry.js +0 -56
package/dist/src/config.d.ts
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type GaiaConnectionConfig } from '@gaia-ai/core';
|
|
2
|
+
import type { AgentCandidate } from './plugins/plugins.js';
|
|
3
|
+
import type { ConductorEngineConfig, ConductorFileConfig } from './types.js';
|
|
4
|
+
export { findGaiaDir, resolveConfigPath, } from '@gaia-ai/core';
|
|
2
5
|
/**
|
|
3
|
-
* Default agent prompt - the
|
|
6
|
+
* Default agent prompt - the project instruction contract. One run works EXACTLY one state;
|
|
4
7
|
* the agent must stop instead of running the whole flow in one session. The run
|
|
5
8
|
* is closed automatically when the ticket state changes on the next claim - the
|
|
6
9
|
* agent does not release it. Run mechanics live here (not in the repo's
|
|
7
|
-
* WORKFLOW.md). The prompt
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* intake line unprinted unless an external skill-forcing hook happened to fire. A
|
|
11
|
-
* conductor config may override via the `prompt` field.
|
|
10
|
+
* WORKFLOW.md). The prompt points directly at the matching project-owned state
|
|
11
|
+
* section and does not prescribe an agent skill. A conductor config may override
|
|
12
|
+
* it via the `prompt` field.
|
|
12
13
|
*
|
|
13
14
|
* The ticket + its comments are NOT embedded (GAIA-112): embedding unbounded
|
|
14
15
|
* ticket content into a single typed pane line overran the PTY canonical line
|
|
@@ -31,7 +32,7 @@ import type { AgentCandidate, ConductorFileConfig } from '@gaia-ai/core';
|
|
|
31
32
|
* wrapper, GAIA-118, was the thing that re-inflated the line past the cap and
|
|
32
33
|
* truncated it mid-quote).
|
|
33
34
|
* Placeholders: `{identifier}`, `{state}`, `{runUuid}` ({state} falls back to
|
|
34
|
-
* `
|
|
35
|
+
* `qualification` for unclassified tickets).
|
|
35
36
|
*/
|
|
36
37
|
export declare const DEFAULT_AGENT_PROMPT: string;
|
|
37
38
|
/**
|
|
@@ -44,19 +45,59 @@ export declare const DEFAULT_AGENT_PROMPT: string;
|
|
|
44
45
|
*/
|
|
45
46
|
export declare function resolveAgents(raw: unknown, configPath: string): Promise<AgentCandidate | AgentCandidate[]>;
|
|
46
47
|
/**
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
48
|
+
* Load the ENGINE half of a conductor config (GAIA-201 split model). Reads
|
|
49
|
+
* remote/executor/agent/workspace + project/states/machine_id/label/prompt/
|
|
50
|
+
* scheduler/hooks — and deliberately NOT `site` or the auth `plugins`, which now
|
|
51
|
+
* live in a `gaia.config.js` connection config. The conductor command composes
|
|
52
|
+
* the two via `composeConductorConfig`. A legacy `conductor.config.js` still
|
|
53
|
+
* carrying `site`/`plugins` loads fine — those two keys are simply ignored here
|
|
54
|
+
* (the connection loader reads them, back-compat).
|
|
55
|
+
*/
|
|
56
|
+
export declare function loadConductorConfig(configFile: string): Promise<ConductorEngineConfig>;
|
|
57
|
+
/**
|
|
58
|
+
* Compose the full `ConductorFileConfig` the engine consumes from the engine
|
|
59
|
+
* half (`loadConductorConfig`) and the connection half (`loadGaiaConfig`). The
|
|
60
|
+
* connection supplies `site` + the auth `plugins`; `ensureAuthenticated` /
|
|
61
|
+
* `selectRemote` read them exactly as before — the fields just arrive from
|
|
62
|
+
* `gaia.config.js` now.
|
|
63
|
+
*/
|
|
64
|
+
export declare function composeConductorConfig(engine: ConductorEngineConfig, connection: Pick<GaiaConnectionConfig, 'site' | 'plugins'>): ConductorFileConfig;
|
|
65
|
+
/**
|
|
66
|
+
* The conductor **stems** in a `.gaia/` dir — the file naming predicate of
|
|
67
|
+
* GAIA-137: exactly `conductor.config.js` (stem `conductor`) or
|
|
68
|
+
* `<variant>.conductor.config.js` (stem `<variant>`). The resolution itself
|
|
69
|
+
* lives in `@gaia-ai/core` (re-exported above); this is the enumeration.
|
|
70
|
+
*/
|
|
71
|
+
export declare function configStems(gaiaDir: string): string[];
|
|
72
|
+
/** Map a conductor stem back to its file name. */
|
|
73
|
+
export declare function fileForStem(stem: string): string;
|
|
74
|
+
/**
|
|
75
|
+
* List the conductor-config **file names** in a `.gaia/` dir, using the same
|
|
76
|
+
* naming predicate the loader uses (`configStems`). This is the only supported
|
|
77
|
+
* enumeration for the `@gaia/upgrade-project` states-strip: it visits the
|
|
78
|
+
* default `conductor.config.js` + every `<variant>.conductor.config.js`, and
|
|
79
|
+
* never an unrelated JS config (`vite.config.js`, the near-miss
|
|
80
|
+
* `myconductor.config.js`).
|
|
81
|
+
*/
|
|
82
|
+
export declare function listConductorConfigFiles(gaiaDir: string): string[];
|
|
83
|
+
/**
|
|
84
|
+
* Remove the obsolete `states:` array property from a conductor-config JS
|
|
85
|
+
* source (GAIA-207 made `states` optional — empty ⇒ serve all claimable
|
|
86
|
+
* states — so `@gaia/upgrade-project` drops the now-dead key). Pure string
|
|
87
|
+
* transform: it strips the `states: [ ... ]` property (line form or inline in
|
|
88
|
+
* an object literal) with its trailing comma, and rewrites nothing else. A
|
|
89
|
+
* `substates:`/other key containing "states" is not matched.
|
|
90
|
+
*/
|
|
91
|
+
export declare function stripStatesFromConfigSource(source: string): string;
|
|
92
|
+
/**
|
|
93
|
+
* Strip the `site:` and `plugins:` properties from an engine config's
|
|
94
|
+
* `export default { … }` (with their leading comment/whitespace), plus the
|
|
95
|
+
* now-orphaned connection preamble consts. Returns the rewritten source and the
|
|
96
|
+
* list of object keys removed (`[]` — source returned unchanged — when there is
|
|
97
|
+
* nothing connection-related to remove). remote/executor/agent/workspace/hooks/
|
|
98
|
+
* project/machine_id/loadLocal are left intact.
|
|
99
|
+
*/
|
|
100
|
+
export declare function stripLegacyConnectionFromConfigSource(source: string): {
|
|
101
|
+
text: string;
|
|
102
|
+
removed: string[];
|
|
103
|
+
};
|