@flydocs/cli 0.6.0-alpha.33 → 0.6.0-alpha.34

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/dist/cli.js CHANGED
@@ -15,7 +15,7 @@ var CLI_VERSION, CLI_NAME, PACKAGE_NAME, POSTHOG_API_KEY;
15
15
  var init_constants = __esm({
16
16
  "src/lib/constants.ts"() {
17
17
  "use strict";
18
- CLI_VERSION = "0.6.0-alpha.33";
18
+ CLI_VERSION = "0.6.0-alpha.34";
19
19
  CLI_NAME = "flydocs";
20
20
  PACKAGE_NAME = "@flydocs/cli";
21
21
  POSTHOG_API_KEY = "phc_v1MSJTQDFkMS90CBh3mxIz3v8bYCCnKU6v1ir6bz0Xn";
@@ -1328,6 +1328,11 @@ async function scanDeprecated(targetDir) {
1328
1328
  found.push(item);
1329
1329
  }
1330
1330
  }
1331
+ for (const file of DEPRECATED_CONTEXT_FILES) {
1332
+ if (await pathExists(join10(targetDir, file))) {
1333
+ found.push(file);
1334
+ }
1335
+ }
1331
1336
  for (const skill of DEPRECATED_SKILLS) {
1332
1337
  const p = join10(targetDir, ".claude", "skills", skill);
1333
1338
  if (await pathExists(p)) {
@@ -1436,7 +1441,7 @@ async function promptCleanup(targetDir, paths) {
1436
1441
  printStatus(`Deleted: ${p}`);
1437
1442
  }
1438
1443
  }
1439
- var DEPRECATED_DIRS, DEPRECATED_FILES, DEPRECATED_SKILLS, DEPRECATED_RULES_DIR, DEPRECATED_FLYDOCS_DIRS, DEPRECATED_HOOKS, DEPRECATED_CURSOR_RULES, DEPRECATED_CURSOR_RULE_DIRS, DEPRECATED_COMMANDS;
1444
+ var DEPRECATED_DIRS, DEPRECATED_FILES, DEPRECATED_CONTEXT_FILES, DEPRECATED_SKILLS, DEPRECATED_RULES_DIR, DEPRECATED_FLYDOCS_DIRS, DEPRECATED_HOOKS, DEPRECATED_CURSOR_RULES, DEPRECATED_CURSOR_RULE_DIRS, DEPRECATED_COMMANDS;
1440
1445
  var init_deprecated = __esm({
1441
1446
  "src/lib/deprecated.ts"() {
1442
1447
  "use strict";
@@ -1444,6 +1449,11 @@ var init_deprecated = __esm({
1444
1449
  init_ui();
1445
1450
  DEPRECATED_DIRS = [".docflow", "docflow"];
1446
1451
  DEPRECATED_FILES = ["AGENTS.md.bak", ".cursor/mcp.json"];
1452
+ DEPRECATED_CONTEXT_FILES = [
1453
+ "flydocs/context/overview.md",
1454
+ "flydocs/context/stack.md",
1455
+ "flydocs/context/standards.md"
1456
+ ];
1447
1457
  DEPRECATED_SKILLS = [
1448
1458
  "linear-workflow",
1449
1459
  "session-workflow",
@@ -3027,11 +3037,11 @@ async function fetchTemplates(apiKey, sinceVersion, workspaceId) {
3027
3037
  }
3028
3038
  return await response.json();
3029
3039
  }
3030
- async function fetchArtifacts(apiKey, sinceVersion) {
3040
+ async function fetchArtifacts(apiKey, sinceVersion, workspaceId) {
3031
3041
  const baseUrl = resolveRelayUrl();
3032
3042
  const response = await fetch(`${baseUrl}/artifacts?since=${sinceVersion}`, {
3033
3043
  method: "GET",
3034
- headers: headers(apiKey),
3044
+ headers: headers(apiKey, workspaceId),
3035
3045
  signal: AbortSignal.timeout(3e4)
3036
3046
  });
3037
3047
  if (!response.ok) {
@@ -3044,23 +3054,6 @@ async function fetchArtifacts(apiKey, sinceVersion) {
3044
3054
  }
3045
3055
  return await response.json();
3046
3056
  }
3047
- async function fetchAgentConfigs(apiKey, workspaceId) {
3048
- const baseUrl = resolveRelayUrl();
3049
- const response = await fetch(`${baseUrl}/artifacts/agent-configs`, {
3050
- method: "GET",
3051
- headers: headers(apiKey, workspaceId),
3052
- signal: AbortSignal.timeout(15e3)
3053
- });
3054
- if (!response.ok) {
3055
- const body = await response.text().catch(() => "");
3056
- throw new RelayError(
3057
- `agent-configs fetch failed (${response.status})`,
3058
- response.status,
3059
- body
3060
- );
3061
- }
3062
- return await response.json();
3063
- }
3064
3057
  async function triggerScan(apiKey, repoName, options) {
3065
3058
  const baseUrl = resolveRelayUrl();
3066
3059
  const body = {
@@ -3191,7 +3184,7 @@ function isPathSkipped(artifactPath, skipPaths) {
3191
3184
  );
3192
3185
  }
3193
3186
  async function syncArtifacts(targetDir, apiKey, workspaceId, currentVersion, skipPaths = []) {
3194
- const response = await fetchArtifacts(apiKey, currentVersion);
3187
+ const response = await fetchArtifacts(apiKey, currentVersion, workspaceId);
3195
3188
  if (response.artifacts.length === 0) {
3196
3189
  return { written: 0, skipped: 0, version: currentVersion };
3197
3190
  }
@@ -3213,23 +3206,6 @@ async function syncArtifacts(targetDir, apiKey, workspaceId, currentVersion, ski
3213
3206
  }
3214
3207
  return { written, skipped, version: response.version };
3215
3208
  }
3216
- async function syncAgentConfigs(targetDir, apiKey, workspaceId, skipPaths = []) {
3217
- const response = await fetchAgentConfigs(apiKey, workspaceId);
3218
- let written = 0;
3219
- for (const file of response.files) {
3220
- if (skipPaths.length > 0 && isPathSkipped(file.path, skipPaths)) {
3221
- continue;
3222
- }
3223
- const filePath = join19(targetDir, file.path);
3224
- await mkdir9(dirname3(filePath), { recursive: true });
3225
- await writeFile11(filePath, file.content, "utf-8");
3226
- written++;
3227
- }
3228
- if (written > 0) {
3229
- printStatus(`Wrote ${written} agent config(s) (CLAUDE.md, AGENTS.md)`);
3230
- }
3231
- return written;
3232
- }
3233
3209
  async function writeArtifact(targetDir, artifact) {
3234
3210
  const filePath = join19(targetDir, artifact.path);
3235
3211
  await mkdir9(dirname3(filePath), { recursive: true });
@@ -3271,25 +3247,6 @@ async function syncAllArtifacts(targetDir, apiKey, workspaceId, currentArtifactV
3271
3247
  printWarning("Artifact sync failed. Will retry on next sync.");
3272
3248
  }
3273
3249
  }
3274
- try {
3275
- const configCount = await syncAgentConfigs(
3276
- targetDir,
3277
- apiKey,
3278
- workspaceId,
3279
- skipPaths
3280
- );
3281
- if (configCount > 0) {
3282
- changes.push(`Wrote ${configCount} agent config(s)`);
3283
- }
3284
- } catch (err) {
3285
- if (err instanceof RelayError) {
3286
- printWarning(
3287
- `Could not fetch agent configs (${err.status}). Will retry on next sync.`
3288
- );
3289
- } else {
3290
- printWarning("Agent config sync failed. Will retry on next sync.");
3291
- }
3292
- }
3293
3250
  return { artifactVersion, changes };
3294
3251
  }
3295
3252
  var init_artifacts = __esm({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flydocs/cli",
3
- "version": "0.6.0-alpha.33",
3
+ "version": "0.6.0-alpha.34",
4
4
  "type": "module",
5
5
  "description": "FlyDocs AI CLI — install, setup, and manage FlyDocs projects",
6
6
  "bin": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.6.0-alpha.33",
2
+ "version": "0.6.0-alpha.34",
3
3
  "sourceRepo": "github.com/plastrlab/flydocs-core",
4
4
  "tier": "local",
5
5
  "setupComplete": false,
@@ -1 +1 @@
1
- 0.6.0-alpha.33
1
+ 0.6.0-alpha.34
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.6.0-alpha.33",
2
+ "version": "0.6.0-alpha.34",
3
3
  "description": "FlyDocs Core - Manifest of all managed files",
4
4
  "repository": "github.com/plastrlab/flydocs-core",
5
5