@potential-agents/cli 0.1.4 → 0.1.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/README.md CHANGED
@@ -16,7 +16,7 @@ p-agents validate
16
16
  CI should pin the version it executes:
17
17
 
18
18
  ```bash
19
- npx --yes @potential-agents/cli@0.1.3 validate
19
+ npx --yes @potential-agents/cli@0.1.5 validate
20
20
  ```
21
21
 
22
22
  ## Bundle
@@ -36,11 +36,11 @@ skills: []
36
36
  Use evidence and identify uncertainty.
37
37
  ```
38
38
 
39
- Run `p-agents validate` without credentials. Connected commands require configuration outside
40
- the bundle:
39
+ Run `p-agents validate` without credentials. Connected commands use the stable public Control
40
+ endpoint `https://agents.potencialventures.cl`; configure only the organization and credential
41
+ outside the bundle:
41
42
 
42
43
  ```bash
43
- export POTENTIAL_AGENTS_API_URL=https://api.example.com
44
44
  export POTENTIAL_AGENTS_ORGANIZATION=org_example
45
45
  export POTENTIAL_AGENTS_TOKEN=opaque_service_credential
46
46
 
@@ -48,6 +48,9 @@ p-agents plan
48
48
  p-agents apply
49
49
  ```
50
50
 
51
+ `POTENTIAL_AGENTS_API_URL` or `--api-url` remains an explicit override for a local fixture or a
52
+ future non-production control plane; it is not required for the standard CLI or GitOps workflow.
53
+
51
54
  `apply` writes `potential.lock`. Commit that generated identity with the reviewed source bundle.
52
55
  The credential is intentionally kept out of `potential.md` and `potential.lock`; set it via a
53
56
  local secret manager or a GitHub deployment-environment secret.
@@ -5,6 +5,8 @@ import { ValidateBundle } from './application/validate-bundle.js';
5
5
  import { FilesystemBundleRepository } from './adapters/outbound/filesystem/bundle-filesystem-repository.js';
6
6
  import { YamlLockRepository } from './adapters/outbound/filesystem/yaml-lock-repository.js';
7
7
  import { HttpPotentialAgentsApi } from './adapters/outbound/http/http-potential-agents-api.js';
8
+ /** Stable public Control API used unless a local or non-production endpoint is explicitly supplied. */
9
+ export declare const DEFAULT_POTENTIAL_AGENTS_API_URL = "https://agents.potencialventures.cl";
8
10
  export interface RuntimeConfiguration {
9
11
  readonly apiUrl?: string;
10
12
  readonly organization?: string;
@@ -6,6 +6,8 @@ import { FilesystemBundleRepository } from './adapters/outbound/filesystem/bundl
6
6
  import { YamlLockRepository } from './adapters/outbound/filesystem/yaml-lock-repository.js';
7
7
  import { HttpPotentialAgentsApi } from './adapters/outbound/http/http-potential-agents-api.js';
8
8
  import { Sha256IdempotencyKeyGenerator } from './adapters/outbound/runtime/sha256-idempotency-key-generator.js';
9
+ /** Stable public Control API used unless a local or non-production endpoint is explicitly supplied. */
10
+ export const DEFAULT_POTENTIAL_AGENTS_API_URL = 'https://agents.potencialventures.cl';
9
11
  /** Composition root: the sole place that binds hexagonal ports to concrete adapters. */
10
12
  export class CliCompositionRoot {
11
13
  bundles = new FilesystemBundleRepository();
@@ -15,13 +17,14 @@ export class CliCompositionRoot {
15
17
  return { validate: new ValidateBundle(this.bundles), bundles: this.bundles };
16
18
  }
17
19
  createConnectedServices(configuration) {
18
- if (!configuration.apiUrl)
19
- throw new Error('POTENTIAL_AGENTS_API_URL or --api-url is required.');
20
20
  if (!configuration.organization)
21
21
  throw new Error('POTENTIAL_AGENTS_ORGANIZATION or --organization is required.');
22
22
  if (!configuration.token)
23
23
  throw new Error('POTENTIAL_AGENTS_TOKEN or --token is required.');
24
- const api = new HttpPotentialAgentsApi({ baseUrl: configuration.apiUrl, accessToken: configuration.token });
24
+ const api = new HttpPotentialAgentsApi({
25
+ baseUrl: configuration.apiUrl ?? DEFAULT_POTENTIAL_AGENTS_API_URL,
26
+ accessToken: configuration.token,
27
+ });
25
28
  const planner = new PlanBundle(this.bundles, this.locks, api);
26
29
  return {
27
30
  planner,
@@ -1 +1 @@
1
- {"version":3,"file":"composition-root.js","sourceRoot":"","sources":["../src/composition-root.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;A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AAE,MAAM,IAAI,KAAK,CAAC,8DAA8D,CAAC,CAAC;QACjH,IAAI,CAAC,aAAa,CAAC,KAAK;YAAE,MAAM,IAAI,KAAK,CAAC,gDAAgD,CAAC,CAAC;QAC5F,MAAM,GAAG,GAAG,IAAI,sBAAsB,CAAC;YACrC,OAAO,EAAE,aAAa,CAAC,MAAM,IAAI,gCAAgC;YACjE,WAAW,EAAE,aAAa,CAAC,KAAK;SACjC,CAAC,CAAC;QACH,MAAM,OAAO,GAAG,IAAI,UAAU,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;QAC9D,OAAO;YACL,OAAO;YACP,KAAK,EAAE,IAAI,WAAW,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,IAAI,CAAC,IAAI,CAAC;YACzE,GAAG,EAAE,IAAI,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,GAAG,EAAE,IAAI,CAAC,IAAI,CAAC;YAC7C,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,GAAG;SACJ,CAAC;IACJ,CAAC;CACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@potential-agents/cli",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "Declarative GitOps CLI for Potential Agents",
5
5
  "license": "MIT",
6
6
  "private": false,