@gaia-ai/gaia 0.15.0 → 0.15.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.
Files changed (2) hide show
  1. package/dist/src/config.js +23 -5
  2. package/package.json +24 -24
@@ -1,8 +1,8 @@
1
- import { homedir, hostname } from 'node:os';
1
+ import { hostname } from 'node:os';
2
2
  import { join } from 'node:path';
3
3
  import { createInterface } from 'node:readline';
4
4
  import { pathToFileURL } from 'node:url';
5
- import { reportLoadedGaiaConfigFields, resolveGaiaConnectionSelection, } from '@gaia-ai/core';
5
+ import { homeGaiaDir, reportLoadedGaiaConfigFields, resolveGaiaConnectionSelection, } from '@gaia-ai/core';
6
6
  import { Option } from 'commander';
7
7
  /** Terminal-only input. Secret characters are never echoed. */
8
8
  async function promptInput(label, secret = false) {
@@ -42,6 +42,10 @@ export function renderConfigReport(report, dryRun = false) {
42
42
  ];
43
43
  for (const file of report.files.filter((file) => file.selected))
44
44
  lines.push(`${file.layer}: ${file.path} (${file.state}; schema ${file.version.effective ?? 'unversioned'} → ${file.version.current ?? 'unversioned'}; ${file.fingerprint ?? 'absent'})`);
45
+ if (report.machine_policy) {
46
+ const { tunnel, source } = report.machine_policy;
47
+ lines.push(`Machine tunnel: ${tunnel === null ? 'unresolved' : tunnel} (from ${source})`);
48
+ }
45
49
  if (report.connection_resolution) {
46
50
  const selected = report.connection_resolution;
47
51
  lines.push(`Connection: ${selected.id} (${selected.selected_by}) — ${selected.path}`);
@@ -102,6 +106,8 @@ function buildConfigCommand(parent, operation, deps, hiddenScope, description) {
102
106
  .option('--workspace-id <uuid>', 'explicit workspace UUID')
103
107
  .option('--workspace <name>', 'committed project workspace name')
104
108
  .option('--secret-env <name>', 'environment variable containing the OAuth secret')
109
+ .option('--after-create <command>', "committed conductor config's after_create hook; empty means none, gaia-cli names no provisioning tool")
110
+ .option('--after-done <command>', "committed conductor config's after_done hook; empty means none, gaia-cli names no provisioning tool")
105
111
  .addOption(new Option('--auth-type <type>', 'sign in with device code (default, no secret) or a client secret (internal/CI)').choices(['client_credentials', 'device']));
106
112
  command.action(async (options) => {
107
113
  if (hiddenScope !== undefined && options.scope === undefined)
@@ -149,10 +155,17 @@ function buildConfigCommand(parent, operation, deps, hiddenScope, description) {
149
155
  options.authType === 'client_credentials'
150
156
  ? 'oauth2_client_credentials'
151
157
  : 'oauth2_device_code';
158
+ if (options.afterCreate !== undefined || options.afterDone !== undefined)
159
+ inputs.hooks = {
160
+ ...(options.afterCreate ? { after_create: options.afterCreate } : {}),
161
+ ...(options.afterDone ? { after_done: options.afterDone } : {}),
162
+ };
152
163
  const planning = {
153
164
  operation,
154
165
  cwd,
155
- home: deps.home ?? homedir(),
166
+ // Only forward an explicitly injected home; absent, core resolves the
167
+ // `.gaia` root itself and honours GAIA_HOME.
168
+ ...(deps.home !== undefined ? { home: deps.home } : {}),
156
169
  inputs,
157
170
  // `gaia init` (hiddenScope !== undefined) never pulls the project
158
171
  // layer in, even inside a project checkout (GAIA-496 finding 1).
@@ -168,7 +181,7 @@ function buildConfigCommand(parent, operation, deps, hiddenScope, description) {
168
181
  else if (options.connection !== undefined) {
169
182
  if (!/^[A-Za-z0-9][A-Za-z0-9._-]*$/.test(options.connection))
170
183
  throw new Error('--connection must be an identifier containing letters, numbers, dot, underscore or hyphen.');
171
- planning.connectionPath = join(deps.home ?? homedir(), '.gaia', 'connections', `${options.connection}.js`);
184
+ planning.connectionPath = join(homeGaiaDir(deps.home), 'connections', `${options.connection}.js`);
172
185
  }
173
186
  let selectedConnection;
174
187
  const initializesNamedConnection = operation === 'init' &&
@@ -177,7 +190,12 @@ function buildConfigCommand(parent, operation, deps, hiddenScope, description) {
177
190
  if (!initializesNamedConnection && options.scope !== 'machine') {
178
191
  selectedConnection = await resolveGaiaConnectionSelection({
179
192
  cwd,
180
- home: deps.home ?? homedir(),
193
+ // Only forward an explicitly injected home; absent, core resolves
194
+ // the `.gaia` root itself and honours GAIA_HOME (same rule as the
195
+ // `planning` object above — a stray `?? homedir()` here would
196
+ // resolve this command's connection selection under `~/.gaia` while
197
+ // the rest of it honours the override).
198
+ ...(deps.home !== undefined ? { home: deps.home } : {}),
181
199
  env,
182
200
  ...(options.config ? { explicit: options.config } : {}),
183
201
  ...(options.connection ? { connection: options.connection } : {}),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gaia-ai/gaia",
3
- "version": "0.15.0",
3
+ "version": "0.15.1",
4
4
  "description": "GAIA meta package: the `gaia` plugin-host CLI + all runtime plugins. Global install target.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -38,29 +38,29 @@
38
38
  "jsonapi"
39
39
  ],
40
40
  "dependencies": {
41
- "@gaia-ai/addon-agents": "^0.15.0",
42
- "@gaia-ai/addon-auth-basic": "^0.15.0",
43
- "@gaia-ai/addon-claude": "^0.15.0",
44
- "@gaia-ai/addon-codex": "^0.15.0",
45
- "@gaia-ai/addon-deployment": "^0.15.0",
46
- "@gaia-ai/addon-dropsh": "^0.15.0",
47
- "@gaia-ai/addon-essentials": "^0.15.0",
48
- "@gaia-ai/addon-gaia-ui": "^0.15.0",
49
- "@gaia-ai/addon-gaia-ui-artifacts": "^0.15.0",
50
- "@gaia-ai/addon-grok": "^0.15.0",
51
- "@gaia-ai/addon-herdr": "^0.15.0",
52
- "@gaia-ai/addon-info": "^0.15.0",
53
- "@gaia-ai/addon-kimi": "^0.15.0",
54
- "@gaia-ai/addon-opencode": "^0.15.0",
55
- "@gaia-ai/addon-pi": "^0.15.0",
56
- "@gaia-ai/addon-ports": "^0.15.0",
57
- "@gaia-ai/addon-ports-ui": "^0.15.0",
58
- "@gaia-ai/addon-remote-drupal": "^0.15.0",
59
- "@gaia-ai/addon-workspace": "^0.15.0",
60
- "@gaia-ai/addon-workspace-git": "^0.15.0",
61
- "@gaia-ai/conductor": "^0.15.0",
62
- "@gaia-ai/core": "^0.15.0",
63
- "@gaia-ai/ui": "^0.15.0",
41
+ "@gaia-ai/addon-agents": "^0.15.1",
42
+ "@gaia-ai/addon-auth-basic": "^0.15.1",
43
+ "@gaia-ai/addon-claude": "^0.15.1",
44
+ "@gaia-ai/addon-codex": "^0.15.1",
45
+ "@gaia-ai/addon-deployment": "^0.15.1",
46
+ "@gaia-ai/addon-dropsh": "^0.15.1",
47
+ "@gaia-ai/addon-essentials": "^0.15.1",
48
+ "@gaia-ai/addon-gaia-ui": "^0.15.1",
49
+ "@gaia-ai/addon-gaia-ui-artifacts": "^0.15.1",
50
+ "@gaia-ai/addon-grok": "^0.15.1",
51
+ "@gaia-ai/addon-herdr": "^0.15.1",
52
+ "@gaia-ai/addon-info": "^0.15.1",
53
+ "@gaia-ai/addon-kimi": "^0.15.1",
54
+ "@gaia-ai/addon-opencode": "^0.15.1",
55
+ "@gaia-ai/addon-pi": "^0.15.1",
56
+ "@gaia-ai/addon-ports": "^0.15.1",
57
+ "@gaia-ai/addon-ports-ui": "^0.15.1",
58
+ "@gaia-ai/addon-remote-drupal": "^0.15.1",
59
+ "@gaia-ai/addon-workspace": "^0.15.1",
60
+ "@gaia-ai/addon-workspace-git": "^0.15.1",
61
+ "@gaia-ai/conductor": "^0.15.1",
62
+ "@gaia-ai/core": "^0.15.1",
63
+ "@gaia-ai/ui": "^0.15.1",
64
64
  "commander": "^12.1.0"
65
65
  }
66
66
  }