@catladder/cli 0.0.0-next-2b60440e → 0.0.0-next-148db771

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/package.json CHANGED
@@ -53,7 +53,7 @@
53
53
  }
54
54
  ],
55
55
  "license": "MIT",
56
- "version": "0.0.0-next-2b60440e",
56
+ "version": "0.0.0-next-148db771",
57
57
  "scripts": {
58
58
  "lint": "eslint \"src/**/*.ts\"",
59
59
  "lint:fix": "eslint \"src/**/*.ts\" --fix",
@@ -1,5 +1,9 @@
1
+ import { createCatenvContext, generateAgentSkills } from "@catladder/pipeline";
1
2
  import type { IO } from "../../../../../core/types";
2
- import { getAllPipelineContexts } from "../../../../../config/getProjectConfig";
3
+ import {
4
+ getAllPipelineContexts,
5
+ getProjectConfig,
6
+ } from "../../../../../config/getProjectConfig";
3
7
  import { setupAccessTokens } from "./setupAccessTokens";
4
8
  import { setupContext } from "./setupContext";
5
9
  import { setupTopic } from "./setupTopic";
@@ -11,6 +15,16 @@ export const setupProject = async (
11
15
  instance: IO,
12
16
  onlyComponents?: string | string[],
13
17
  ) => {
18
+ // refresh the agent skills first — store-independent, so it survives a
19
+ // later failure (e.g. missing gcloud auth in ensureGcloudProjectNumbers).
20
+ // This makes `catladder project setup` the one command that also lands
21
+ // the skills, so agents helping a migrating project get them even when
22
+ // catenv itself can't run yet (e.g. before the store is populated).
23
+ const config = await getProjectConfig();
24
+ if (config) {
25
+ await generateAgentSkills(createCatenvContext(config));
26
+ }
27
+
14
28
  // must come first: creating contexts already requires the store
15
29
  await ensureGcloudProjectNumbers(instance);
16
30
  const allContext = await getAllPipelineContexts(onlyComponents);