@nuucognition/flint-cli 0.6.0-dev.4 → 0.6.0-dev.6

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/index.js +75 -51
  2. package/package.json +4 -4
package/dist/index.js CHANGED
@@ -14096,15 +14096,15 @@ import { readFile as readFile35, writeFile as writeFile42, mkdir as mkdir52, acc
14096
14096
  import { join as join62 } from "path";
14097
14097
  import { mkdir as mkdir72, stat as stat42 } from "fs/promises";
14098
14098
  import { join as join82 } from "path";
14099
- import { exec as exec3 } from "child_process";
14099
+ import { execFile as execFile7 } from "child_process";
14100
14100
  import { promisify as promisify32 } from "util";
14101
14101
  import { rm as rm32 } from "fs/promises";
14102
- import { execFile as execFile7 } from "child_process";
14102
+ import { execFile as execFile22 } from "child_process";
14103
14103
  import { cp as cp4, mkdir as mkdir82, readdir as readdir42, readFile as readFile52, rename as rename32, rm as rm42, stat as stat52, writeFile as writeFile62 } from "fs/promises";
14104
14104
  import { homedir as homedir22 } from "os";
14105
14105
  import { basename as basename32, dirname as dirname23, join as join92, resolve as resolve32 } from "path";
14106
14106
  import { promisify as promisify52 } from "util";
14107
- import { exec as exec4 } from "child_process";
14107
+ import { exec as exec3 } from "child_process";
14108
14108
  import { promisify as promisify42 } from "util";
14109
14109
  import { promises as fs7 } from "fs";
14110
14110
  import path5 from "path";
@@ -14154,7 +14154,7 @@ import { promises as fs8 } from "fs";
14154
14154
  import path10 from "path";
14155
14155
  import path11 from "path";
14156
14156
  import path12 from "path";
14157
- import { exec as exec5 } from "child_process";
14157
+ import { execFile as execFile32 } from "child_process";
14158
14158
  import { promises as fs9 } from "fs";
14159
14159
  import path13 from "path";
14160
14160
  import { promisify as promisify62 } from "util";
@@ -14168,7 +14168,7 @@ import { promises as fs13 } from "fs";
14168
14168
  import path17 from "path";
14169
14169
  import { promises as fs14 } from "fs";
14170
14170
  import path18 from "path";
14171
- import { exec as exec6 } from "child_process";
14171
+ import { execFile as execFile42 } from "child_process";
14172
14172
  import { promises as fs15 } from "fs";
14173
14173
  import path19 from "path";
14174
14174
  import { promisify as promisify72 } from "util";
@@ -16179,7 +16179,7 @@ async function cloneRepository(flintPath, name, url) {
16179
16179
  return repoPath;
16180
16180
  }
16181
16181
  try {
16182
- await execAsync32(`git clone "${url}" "${repoPath}"`);
16182
+ await execFileAsync6("git", ["clone", url, repoPath]);
16183
16183
  } catch (error3) {
16184
16184
  const message = error3 instanceof Error ? error3.message : String(error3);
16185
16185
  throw new Error(`Failed to clone repository: ${message}`);
@@ -16190,12 +16190,12 @@ async function updateRepository(flintPath, name, url) {
16190
16190
  const repoPath = getRepositoryPath(flintPath, name);
16191
16191
  if (await pathExists4(repoPath)) {
16192
16192
  try {
16193
- await execAsync32("git rev-parse HEAD", { cwd: repoPath });
16193
+ await execFileAsync6("git", ["rev-parse", "HEAD"], { cwd: repoPath });
16194
16194
  } catch {
16195
16195
  await rm32(repoPath, { recursive: true, force: true });
16196
16196
  return cloneRepository(flintPath, name, url);
16197
16197
  }
16198
- await execAsync32("git pull", { cwd: repoPath });
16198
+ await execFileAsync6("git", ["pull"], { cwd: repoPath });
16199
16199
  return repoPath;
16200
16200
  }
16201
16201
  return cloneRepository(flintPath, name, url);
@@ -16223,7 +16223,7 @@ async function cloneSourceRepository(flintPath, name, url) {
16223
16223
  return repoPath;
16224
16224
  }
16225
16225
  try {
16226
- await execAsync32(`git clone --depth 1 "${url}" "${repoPath}"`);
16226
+ await execFileAsync6("git", ["clone", "--depth", "1", url, repoPath]);
16227
16227
  } catch (error3) {
16228
16228
  const message = error3 instanceof Error ? error3.message : String(error3);
16229
16229
  throw new Error(`Failed to clone source repository: ${message}`);
@@ -16264,7 +16264,7 @@ async function getSourceRepositoryStatus(flintPath) {
16264
16264
  }
16265
16265
  async function isGitInitialized(flintPath) {
16266
16266
  try {
16267
- await execAsync4("git rev-parse --git-dir", { cwd: flintPath });
16267
+ await execAsync32("git rev-parse --git-dir", { cwd: flintPath });
16268
16268
  return true;
16269
16269
  } catch {
16270
16270
  return false;
@@ -16272,7 +16272,7 @@ async function isGitInitialized(flintPath) {
16272
16272
  }
16273
16273
  async function initGit(flintPath) {
16274
16274
  try {
16275
- await execAsync4("git init", { cwd: flintPath });
16275
+ await execAsync32("git init", { cwd: flintPath });
16276
16276
  await createGitignore(flintPath);
16277
16277
  return { success: true, output: "Git initialized with .gitignore" };
16278
16278
  } catch (err) {
@@ -16295,10 +16295,10 @@ async function getGitStatus(flintPath) {
16295
16295
  };
16296
16296
  }
16297
16297
  try {
16298
- const { stdout: branchOut } = await execAsync4("git branch --show-current", {
16298
+ const { stdout: branchOut } = await execAsync32("git branch --show-current", {
16299
16299
  cwd: flintPath
16300
16300
  });
16301
- const { stdout: statusOut } = await execAsync4("git status --porcelain", {
16301
+ const { stdout: statusOut } = await execAsync32("git status --porcelain", {
16302
16302
  cwd: flintPath
16303
16303
  });
16304
16304
  const lines = statusOut.trim().split(/\r?\n/).filter(Boolean);
@@ -16340,7 +16340,7 @@ async function runGit(flintPath, args, options3) {
16340
16340
  const quotedArgs = args.map(
16341
16341
  (arg) => arg.includes(" ") ? `"${arg}"` : arg
16342
16342
  );
16343
- const { stdout, stderr } = await execAsync4(`git ${quotedArgs.join(" ")}`, {
16343
+ const { stdout, stderr } = await execAsync32(`git ${quotedArgs.join(" ")}`, {
16344
16344
  cwd: flintPath,
16345
16345
  env: options3?.env ? { ...process.env, ...options3.env } : void 0
16346
16346
  });
@@ -16968,7 +16968,7 @@ async function ensureFlintStructure(flintPath) {
16968
16968
  async function materializeGitFlint(root, declaration) {
16969
16969
  const tempPath = join92(root, `.tinderbox-clone-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`);
16970
16970
  try {
16971
- await execFileAsync6("git", ["clone", declaration.source, tempPath]);
16971
+ await execFileAsync22("git", ["clone", declaration.source, tempPath]);
16972
16972
  const config = await readFlintToml(tempPath);
16973
16973
  const actualName = config?.flint?.name;
16974
16974
  if (!actualName) {
@@ -20780,9 +20780,11 @@ function driftOf5(payload) {
20780
20780
  }
20781
20781
  async function readOriginUrl(repoPath) {
20782
20782
  try {
20783
- const { stdout } = await execAsync5("git config --get remote.origin.url", {
20784
- cwd: repoPath
20785
- });
20783
+ const { stdout } = await execFileAsync32(
20784
+ "git",
20785
+ ["config", "--get", "remote.origin.url"],
20786
+ { cwd: repoPath }
20787
+ );
20786
20788
  return stdout.trim() || null;
20787
20789
  } catch {
20788
20790
  return null;
@@ -20790,15 +20792,14 @@ async function readOriginUrl(repoPath) {
20790
20792
  }
20791
20793
  async function readDirty(repoPath) {
20792
20794
  try {
20793
- const { stdout } = await execAsync5("git status --porcelain", { cwd: repoPath });
20795
+ const { stdout } = await execFileAsync32("git", ["status", "--porcelain"], {
20796
+ cwd: repoPath
20797
+ });
20794
20798
  return stdout.trim().length > 0;
20795
20799
  } catch {
20796
20800
  return false;
20797
20801
  }
20798
20802
  }
20799
- function shellQuote(value) {
20800
- return `'${value.replace(/'/g, "'\\''")}'`;
20801
- }
20802
20803
  function partitionIntent7(world) {
20803
20804
  const shards = world.intent.shards;
20804
20805
  return partitionEntries({
@@ -21078,15 +21079,12 @@ function renderBody8(entry) {
21078
21079
  function toSnake8(name) {
21079
21080
  return name.trim().replace(/[^A-Za-z0-9]+/g, "_").replace(/^_+|_+$/g, "").toLowerCase();
21080
21081
  }
21081
- function shellQuote2(value) {
21082
- return `'${value.replace(/'/g, "'\\''")}'`;
21083
- }
21084
21082
  function registerAllFeatures() {
21085
21083
  if (registered) return;
21086
21084
  for (const feature of allFeatures) registerFeature(feature);
21087
21085
  registered = true;
21088
21086
  }
21089
- var STANDARD_DIRECTORIES, execAsync3, OBSIDIAN_REPO_URL, OBSIDIAN_WINDOWS_REPO_URL, GLOBAL_CONFIG_FILENAME, execAsync22, DEFAULT_PLATES_ORG, PLATE_SKIP_DIRS, FRONTMATTER_RE, SKIP_DIRS, execAsync32, execAsync4, REFERENCES_LOCAL_FILE, FulfillmentSchema, ReferencesLocalSchema, FALLBACK2, execFileAsync6, TINDERBOX_CONFIG_FILENAME, REQUIRED_FLINT_DIRS, TINDERBOX_GITIGNORE_HEADER, TINDERBOX_GITIGNORE_PATTERN, SHARD_SYSTEM_FOLDERS, SHARD_SPEC_DIRS_INSTALLED, SHARD_SPEC_DIRS_SOURCE, OPTIONAL_SHARD_ROOT_DIRS, SHARD_DIRS_ALLOWING_NESTING, ROOT_MARKDOWN_FILES, SHARD_NAME_PATTERN, SHARD_NAME_REGEX, SHARD_SEMVER_REGEX, SHARD_SCRIPT_REGEX, DEV_SHARD_SCRIPT_REGEX, MARKDOWN_FILENAME_LINE_REGEX, MARKDOWN_CODE_FENCE_REGEX, MARKDOWN_COMMENT_REGEX, MARKDOWN_LIFECYCLE_REGEX, SKILL_REFERENCE_REGEX, WORKFLOW_REFERENCE_REGEX, TEMPLATE_REFERENCE_REGEX, KNOWLEDGE_REFERENCE_REGEX, HUMAN_CHECKPOINT_REGEX, TYPE_DEFINITION_PROPERTIES, TEMPLATE_LINK_TARGET_REGEX, VALID_COMMAND_NAME, DISCOVERY_FILE_PATH, __dirname2, presetsCache, PROMPTS_BASE_PATH, IntentFrameSchema, EntityFrameSchema, features, KERNEL_FEATURE_ID, EMPTY_INTENT, EMPTY_ENTITY, IDENTITY_FEATURE_ID, IDENTITY_MARKERS_DIR, identity2, BUNDLE_EXPORTS_FEATURE_ID, BUNDLE_EXPORTS_DIR, BUNDLE_EXPORTS_MARKERS_DIR, BundleExportEntrySchema, bundleExports, CODEBASE_REFERENCES_FEATURE_ID, CODEBASE_REFERENCES_MARKERS_DIR, CodebaseReferenceEntrySchema, codebaseReferences, FLINT_BUNDLE_REFERENCES_FEATURE_ID, FLINT_BUNDLE_REFERENCES_MARKERS_DIR, FlintBundleReferenceEntrySchema, flintBundleReferences, FLINT_REFERENCES_FEATURE_ID, FLINT_REFERENCES_MARKERS_DIR, FlintReferenceEntrySchema, flintReferences, LATTICE_REFERENCES_FEATURE_ID, LATTICE_REFERENCES_MARKERS_DIR, LatticeReferenceEntrySchema, latticeReferences, execAsync5, WORKSPACE_REPOS_FEATURE_ID, WORKSPACE_REPOS_DIR, WORKSPACE_REPOS_MARKERS_DIR, WorkspaceRepoEntrySchema, workspaceRepos, NAME, OWNER_REPO, LOCAL_SOURCE, InstalledShardEntrySchema, DevRemoteShardEntrySchema, DevLocalShardEntrySchema, DEV_LOCAL_SHARDS_FEATURE_ID, SHARDS_DIR, REQUIRED_ROOT_FILES, devLocalShards, DEV_REMOTE_SHARDS_FEATURE_ID, SHARDS_DIR2, REQUIRED_ROOT_FILES2, devRemoteShards, INSTALLED_SHARDS_FEATURE_ID, SHARDS_DIR3, installedShards, SHARD_REPOS_FEATURE_ID, SHARDS_DIR4, shardRepos, FLINT_BUNDLES_FEATURE_ID, FLINT_BUNDLES_DIR, FLINT_BUNDLES_MARKERS_DIR, FlintBundleEntrySchema, flintBundles, execAsync6, SOURCE_REPOS_FEATURE_ID, SOURCE_REPOS_DIR, SOURCE_REPOS_MARKERS_DIR, SourceRepoEntrySchema, sourceRepos, allFeatures, registered;
21087
+ var STANDARD_DIRECTORIES, execAsync3, OBSIDIAN_REPO_URL, OBSIDIAN_WINDOWS_REPO_URL, GLOBAL_CONFIG_FILENAME, execAsync22, DEFAULT_PLATES_ORG, PLATE_SKIP_DIRS, FRONTMATTER_RE, SKIP_DIRS, execFileAsync6, execAsync32, REFERENCES_LOCAL_FILE, FulfillmentSchema, ReferencesLocalSchema, FALLBACK2, execFileAsync22, TINDERBOX_CONFIG_FILENAME, REQUIRED_FLINT_DIRS, TINDERBOX_GITIGNORE_HEADER, TINDERBOX_GITIGNORE_PATTERN, SHARD_SYSTEM_FOLDERS, SHARD_SPEC_DIRS_INSTALLED, SHARD_SPEC_DIRS_SOURCE, OPTIONAL_SHARD_ROOT_DIRS, SHARD_DIRS_ALLOWING_NESTING, ROOT_MARKDOWN_FILES, SHARD_NAME_PATTERN, SHARD_NAME_REGEX, SHARD_SEMVER_REGEX, SHARD_SCRIPT_REGEX, DEV_SHARD_SCRIPT_REGEX, MARKDOWN_FILENAME_LINE_REGEX, MARKDOWN_CODE_FENCE_REGEX, MARKDOWN_COMMENT_REGEX, MARKDOWN_LIFECYCLE_REGEX, SKILL_REFERENCE_REGEX, WORKFLOW_REFERENCE_REGEX, TEMPLATE_REFERENCE_REGEX, KNOWLEDGE_REFERENCE_REGEX, HUMAN_CHECKPOINT_REGEX, TYPE_DEFINITION_PROPERTIES, TEMPLATE_LINK_TARGET_REGEX, VALID_COMMAND_NAME, DISCOVERY_FILE_PATH, __dirname2, presetsCache, PROMPTS_BASE_PATH, IntentFrameSchema, EntityFrameSchema, features, KERNEL_FEATURE_ID, EMPTY_INTENT, EMPTY_ENTITY, IDENTITY_FEATURE_ID, IDENTITY_MARKERS_DIR, identity2, BUNDLE_EXPORTS_FEATURE_ID, BUNDLE_EXPORTS_DIR, BUNDLE_EXPORTS_MARKERS_DIR, BundleExportEntrySchema, bundleExports, CODEBASE_REFERENCES_FEATURE_ID, CODEBASE_REFERENCES_MARKERS_DIR, CodebaseReferenceEntrySchema, codebaseReferences, FLINT_BUNDLE_REFERENCES_FEATURE_ID, FLINT_BUNDLE_REFERENCES_MARKERS_DIR, FlintBundleReferenceEntrySchema, flintBundleReferences, FLINT_REFERENCES_FEATURE_ID, FLINT_REFERENCES_MARKERS_DIR, FlintReferenceEntrySchema, flintReferences, LATTICE_REFERENCES_FEATURE_ID, LATTICE_REFERENCES_MARKERS_DIR, LatticeReferenceEntrySchema, latticeReferences, execFileAsync32, WORKSPACE_REPOS_FEATURE_ID, WORKSPACE_REPOS_DIR, WORKSPACE_REPOS_MARKERS_DIR, WorkspaceRepoEntrySchema, workspaceRepos, NAME, OWNER_REPO, LOCAL_SOURCE, InstalledShardEntrySchema, DevRemoteShardEntrySchema, DevLocalShardEntrySchema, DEV_LOCAL_SHARDS_FEATURE_ID, SHARDS_DIR, REQUIRED_ROOT_FILES, devLocalShards, DEV_REMOTE_SHARDS_FEATURE_ID, SHARDS_DIR2, REQUIRED_ROOT_FILES2, devRemoteShards, INSTALLED_SHARDS_FEATURE_ID, SHARDS_DIR3, installedShards, SHARD_REPOS_FEATURE_ID, SHARDS_DIR4, shardRepos, FLINT_BUNDLES_FEATURE_ID, FLINT_BUNDLES_DIR, FLINT_BUNDLES_MARKERS_DIR, FlintBundleEntrySchema, flintBundles, execFileAsync42, SOURCE_REPOS_FEATURE_ID, SOURCE_REPOS_DIR, SOURCE_REPOS_MARKERS_DIR, SourceRepoEntrySchema, sourceRepos, allFeatures, registered;
21090
21088
  var init_dist4 = __esm({
21091
21089
  "../../packages/flint/dist/index.js"() {
21092
21090
  "use strict";
@@ -21133,8 +21131,8 @@ var init_dist4 = __esm({
21133
21131
  PLATE_SKIP_DIRS = /* @__PURE__ */ new Set(["node_modules", "dist", ".git"]);
21134
21132
  FRONTMATTER_RE = /^---\r?\n([\s\S]*?)\r?\n---\r?\n?/;
21135
21133
  SKIP_DIRS = /* @__PURE__ */ new Set(["Agents", "node_modules", ".git"]);
21136
- execAsync32 = promisify32(exec3);
21137
- execAsync4 = promisify42(exec4);
21134
+ execFileAsync6 = promisify32(execFile7);
21135
+ execAsync32 = promisify42(exec3);
21138
21136
  REFERENCES_LOCAL_FILE = path5.join(".flint", "references.json");
21139
21137
  FulfillmentSchema = external_exports.object({
21140
21138
  name: external_exports.string(),
@@ -21155,7 +21153,7 @@ var init_dist4 = __esm({
21155
21153
  bundles: [],
21156
21154
  lattices: []
21157
21155
  };
21158
- execFileAsync6 = promisify52(execFile7);
21156
+ execFileAsync22 = promisify52(execFile22);
21159
21157
  TINDERBOX_CONFIG_FILENAME = "tinderbox.toml";
21160
21158
  REQUIRED_FLINT_DIRS = [
21161
21159
  "Mesh",
@@ -21730,7 +21728,7 @@ var init_dist4 = __esm({
21730
21728
  };
21731
21729
  }
21732
21730
  };
21733
- execAsync5 = promisify62(exec5);
21731
+ execFileAsync32 = promisify62(execFile32);
21734
21732
  WORKSPACE_REPOS_FEATURE_ID = "workspace-repos";
21735
21733
  WORKSPACE_REPOS_DIR = path13.join("Workspace", "Repos");
21736
21734
  WORKSPACE_REPOS_MARKERS_DIR = path13.join("Mesh", "Metadata", "Related", "Repos");
@@ -21821,9 +21819,7 @@ var init_dist4 = __esm({
21821
21819
  if (payload.kind !== "missing") return [];
21822
21820
  const target = path13.join(world.root, payload.targetPath);
21823
21821
  await fs9.mkdir(path13.dirname(target), { recursive: true });
21824
- await execAsync5(
21825
- `git clone ${shellQuote(payload.entry.url)} ${shellQuote(target)}`
21826
- );
21822
+ await execFileAsync32("git", ["clone", payload.entry.url, target]);
21827
21823
  return [];
21828
21824
  },
21829
21825
  markers(intent) {
@@ -22427,7 +22423,7 @@ var init_dist4 = __esm({
22427
22423
  };
22428
22424
  }
22429
22425
  };
22430
- execAsync6 = promisify72(exec6);
22426
+ execFileAsync42 = promisify72(execFile42);
22431
22427
  SOURCE_REPOS_FEATURE_ID = "source-repos";
22432
22428
  SOURCE_REPOS_DIR = path19.join("Sources", "Repos");
22433
22429
  SOURCE_REPOS_MARKERS_DIR = path19.join("Mesh", "Metadata", "Sources", "Repos");
@@ -22491,9 +22487,7 @@ var init_dist4 = __esm({
22491
22487
  if (payload.kind !== "missing") return [];
22492
22488
  const target = path19.join(world.root, payload.targetPath);
22493
22489
  await fs15.mkdir(path19.dirname(target), { recursive: true });
22494
- await execAsync6(
22495
- `git clone --depth 1 ${shellQuote2(payload.entry.url)} ${shellQuote2(target)}`
22496
- );
22490
+ await execFileAsync42("git", ["clone", "--depth", "1", payload.entry.url, target]);
22497
22491
  await fs15.rm(path19.join(target, ".git"), { recursive: true, force: true });
22498
22492
  return [];
22499
22493
  },
@@ -156527,7 +156521,7 @@ import { resolve as resolve9, join as join19 } from "path";
156527
156521
  import { existsSync as existsSync5 } from "fs";
156528
156522
  import { mkdtemp as mkdtemp3, rm as rm9, rename as rename9 } from "fs/promises";
156529
156523
  import { tmpdir as tmpdir3 } from "os";
156530
- import { exec as exec7 } from "child_process";
156524
+ import { exec as exec4 } from "child_process";
156531
156525
  import { promisify as promisify9 } from "util";
156532
156526
 
156533
156527
  // src/utils.ts
@@ -156658,7 +156652,7 @@ function formatPayload(payload) {
156658
156652
  }
156659
156653
 
156660
156654
  // src/commands/flint/init.ts
156661
- var execAsync7 = promisify9(exec7);
156655
+ var execAsync4 = promisify9(exec4);
156662
156656
  function openObsidianVaultChooser() {
156663
156657
  const os7 = platform4();
156664
156658
  const uri = "obsidian://choose-vault";
@@ -156697,7 +156691,7 @@ Cloning ${export_pc.cyan(url)}...
156697
156691
  `);
156698
156692
  tempDir = await mkdtemp3(join19(tmpdir3(), "flint-clone-"));
156699
156693
  try {
156700
- await execAsync7(`git clone "${url}" "${tempDir}"`, { timeout: 12e4, windowsHide: true });
156694
+ await execAsync4(`git clone "${url}" "${tempDir}"`, { timeout: 12e4, windowsHide: true });
156701
156695
  } catch (err) {
156702
156696
  const message = err instanceof Error ? err.message : String(err);
156703
156697
  throw new Error(`Git clone failed: ${message}`);
@@ -157146,22 +157140,22 @@ init_dist4();
157146
157140
  import { resolve as resolve10 } from "path";
157147
157141
 
157148
157142
  // src/open-flint.ts
157149
- import { exec as exec8 } from "child_process";
157143
+ import { exec as exec5 } from "child_process";
157150
157144
  import { promisify as promisify10 } from "util";
157151
157145
  import { platform as platform5 } from "os";
157152
157146
  init_dist4();
157153
- var execAsync8 = promisify10(exec8);
157147
+ var execAsync5 = promisify10(exec5);
157154
157148
  async function launchObsidianAtPath(path30) {
157155
157149
  const os7 = platform5();
157156
157150
  if (os7 === "darwin") {
157157
- await execAsync8(`open -a "Obsidian" "${path30}"`);
157151
+ await execAsync5(`open -a "Obsidian" "${path30}"`);
157158
157152
  } else if (os7 === "win32") {
157159
- await execAsync8(`start "" "${path30}"`);
157153
+ await execAsync5(`start "" "${path30}"`);
157160
157154
  } else {
157161
157155
  try {
157162
- await execAsync8(`obsidian "${path30}"`);
157156
+ await execAsync5(`obsidian "${path30}"`);
157163
157157
  } catch {
157164
- await execAsync8(`xdg-open "${path30}"`);
157158
+ await execAsync5(`xdg-open "${path30}"`);
157165
157159
  }
157166
157160
  }
157167
157161
  }
@@ -157843,6 +157837,36 @@ Created repository: ${export_pc.bold(name)}`));
157843
157837
  process.exit(1);
157844
157838
  }
157845
157839
  })
157840
+ ).addCommand(
157841
+ new Command("clone").description("Clone an existing remote into Workspace/Repos/ and declare it in flint.toml").argument("<name>", "Name for this repository (Proper Case)").argument("<remote>", "Git remote URL to clone from").option("-p, --path <dir>", "Path to flint (default: auto-detect)").action(async (name, remote, options3) => {
157842
+ try {
157843
+ const flintPath = options3.path || await findFlintRoot(process.cwd());
157844
+ if (!flintPath) {
157845
+ console.error(export_pc.red("Error: Not inside a Flint. Use --path or cd into a Flint."));
157846
+ process.exit(1);
157847
+ }
157848
+ const existing = await getWorkspaceRepository(flintPath, name);
157849
+ if (existing) {
157850
+ console.error(export_pc.red(`Error: Repository "${name}" already exists in flint.toml.`));
157851
+ process.exit(1);
157852
+ }
157853
+ console.log(export_pc.dim(`
157854
+ Cloning repository ${name} from ${remote}...`));
157855
+ await addWorkspaceRepository(flintPath, name, remote);
157856
+ const repoPath = await cloneRepository(flintPath, name, remote);
157857
+ await updateGitignore(flintPath);
157858
+ console.log(export_pc.green(`
157859
+ Cloned repository: ${export_pc.bold(name)}`));
157860
+ console.log(export_pc.dim(` Remote: ${remote}`));
157861
+ console.log(export_pc.dim(` Path: ${abbreviatePath(repoPath)}`));
157862
+ console.log(export_pc.dim(" Added to flint.toml [workspace] section"));
157863
+ console.log();
157864
+ } catch (err) {
157865
+ const message = err instanceof Error ? err.message : String(err);
157866
+ console.error(export_pc.red(`Error: ${message}`));
157867
+ process.exit(1);
157868
+ }
157869
+ })
157846
157870
  ).addCommand(
157847
157871
  new Command("remove").description("Remove a workspace repository").argument("<name>", "Name of the repository to remove").option("-f, --force", "Skip confirmation prompt").option("-p, --path <dir>", "Path to flint (default: auto-detect)").action(async (name, options3) => {
157848
157872
  try {
@@ -161465,15 +161489,15 @@ setCommandGroups(shardCommand, [
161465
161489
  ]);
161466
161490
 
161467
161491
  // src/commands/config/config.ts
161468
- import { exec as exec9 } from "child_process";
161492
+ import { exec as exec6 } from "child_process";
161469
161493
  import { promisify as promisify11 } from "util";
161470
- var execAsync9 = promisify11(exec9);
161494
+ var execAsync6 = promisify11(exec6);
161471
161495
  var CONFIG_PATH = getConfigPath("flint");
161472
161496
  var openSubcommand = new Command("open").description("Open config file in your editor").action(async () => {
161473
161497
  try {
161474
161498
  const editor = process.env.EDITOR || process.env.VISUAL || "open";
161475
161499
  console.log(export_pc.dim(`Opening ${CONFIG_PATH}...`));
161476
- await execAsync9(`${editor} "${CONFIG_PATH}"`);
161500
+ await execAsync6(`${editor} "${CONFIG_PATH}"`);
161477
161501
  } catch (err) {
161478
161502
  const message = err instanceof Error ? err.message : String(err);
161479
161503
  console.error(export_pc.red(`Error: ${message}`));
@@ -170568,7 +170592,7 @@ var expandTabs = (line) => {
170568
170592
  }
170569
170593
  return expandedLine;
170570
170594
  };
170571
- var exec10 = (string, columns, options3 = {}) => {
170595
+ var exec7 = (string, columns, options3 = {}) => {
170572
170596
  if (options3.trim !== false && string.trim() === "") {
170573
170597
  return "";
170574
170598
  }
@@ -170654,7 +170678,7 @@ var exec10 = (string, columns, options3 = {}) => {
170654
170678
  return returnValue;
170655
170679
  };
170656
170680
  function wrapAnsi(string, columns, options3) {
170657
- return String(string).normalize().replaceAll("\r\n", "\n").split("\n").map((line) => exec10(expandTabs(line), columns, options3)).join("\n");
170681
+ return String(string).normalize().replaceAll("\r\n", "\n").split("\n").map((line) => exec7(expandTabs(line), columns, options3)).join("\n");
170658
170682
  }
170659
170683
 
170660
170684
  // ../orbh-cli/src/terminal-format.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuucognition/flint-cli",
3
- "version": "0.6.0-dev.4",
3
+ "version": "0.6.0-dev.6",
4
4
  "type": "module",
5
5
  "description": "Flint cognitive workspace CLI",
6
6
  "license": "PROPRIETARY",
@@ -36,11 +36,11 @@
36
36
  "@nuucognition/flint-server": "0.0.1",
37
37
  "@nuucognition/flint-sdk": "0.0.1",
38
38
  "@nuucognition/eslint-config": "0.0.0",
39
- "@nuucognition/flint": "0.1.0",
40
39
  "@nuucognition/flint-migrations": "0.1.0",
41
- "@nuucognition/orbh": "0.0.1-dev.0",
40
+ "@nuucognition/flint": "0.1.0",
42
41
  "@nuucognition/orbh-cli": "0.1.0-dev.1",
43
- "@nuucognition/typescript-config": "0.0.0"
42
+ "@nuucognition/typescript-config": "0.0.0",
43
+ "@nuucognition/orbh": "0.0.1-dev.0"
44
44
  },
45
45
  "scripts": {
46
46
  "predev": "turbo build --filter=@nuucognition/flint-cli^...",