archondev 2.0.0 → 2.1.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.
package/README.md CHANGED
@@ -81,6 +81,20 @@ Copy governance files into any project. Works with your existing AI tools: **Cur
81
81
  | `archon seo fix` | Apply recommended SEO fixes |
82
82
  | `archon geo identity` | Generate brand identity phrases for AI citation |
83
83
  | `archon geo schema` | Generate JSON-LD schemas |
84
+ | `archon github connect` | Link GitHub account for cloud execution |
85
+ | `archon github status` | Check GitHub connection status |
86
+ | `archon session save [name]` | Save current session to cloud |
87
+ | `archon session resume [id]` | Resume session on another device |
88
+ | `archon execute ATOM --cloud` | Execute in cloud (creates PR when done) |
89
+ | `archon cloud status` | List cloud executions |
90
+ | `archon index init [--local\|--cloud]` | Initialize semantic indexing |
91
+ | `archon index update [--cloud]` | Index changed files |
92
+ | `archon index search "query" [--cloud]` | Semantic code search |
93
+ | `archon parallel status` | Show parallel execution status |
94
+ | `archon deploy` | One-click deploy (auto-detect platform) |
95
+ | `archon cleanup check` | Analyze workspace for bloat |
96
+ | `archon cleanup run` | Execute cleanup tasks |
97
+ | `archon cleanup auto [enable\|disable]` | Enable/disable auto cleanup on start |
84
98
 
85
99
  ## Pricing
86
100
 
@@ -2952,23 +2952,51 @@ Logs for ${exec.id.slice(0, 8)} (${exec.atom_id}):
2952
2952
  console.log(`${ts} ${level} ${log.message}`);
2953
2953
  }
2954
2954
  }
2955
- async function queueCloudExecution(atomId, projectName) {
2955
+ async function queueCloudExecution(atomId, projectName, options) {
2956
2956
  const config = await loadConfig();
2957
2957
  const authToken = getAuthToken(config);
2958
2958
  if (!authToken) {
2959
2959
  throw new Error('Not authenticated. Run "archon login" first.');
2960
2960
  }
2961
2961
  const client = getClient();
2962
- const { data, error } = await client.from("cloud_executions").insert({
2962
+ const insertData = {
2963
2963
  atom_id: atomId,
2964
2964
  project_name: projectName,
2965
2965
  status: "queued"
2966
- }).select("id").single();
2966
+ };
2967
+ if (options?.repoUrl) {
2968
+ insertData["repo_url"] = options.repoUrl;
2969
+ }
2970
+ if (options?.repoBranch) {
2971
+ insertData["repo_branch"] = options.repoBranch;
2972
+ }
2973
+ if (options?.atomData) {
2974
+ insertData["atom_data"] = options.atomData;
2975
+ }
2976
+ const { data, error } = await client.from("cloud_executions").insert(insertData).select("id").single();
2967
2977
  if (error) {
2968
2978
  throw new Error(`Failed to queue execution: ${error.message}`);
2969
2979
  }
2970
2980
  return data.id;
2971
2981
  }
2982
+ async function getGitRemoteUrl(cwd = process.cwd()) {
2983
+ try {
2984
+ const { execSync: execSync4 } = await import("child_process");
2985
+ const output = execSync4("git remote get-url origin", { cwd, encoding: "utf-8" });
2986
+ return output.trim();
2987
+ } catch {
2988
+ return null;
2989
+ }
2990
+ }
2991
+ async function getGitBranch(cwd = process.cwd()) {
2992
+ try {
2993
+ const { execSync: execSync4 } = await import("child_process");
2994
+ const output = execSync4("git branch --show-current", { cwd, encoding: "utf-8" });
2995
+ return output.trim() || "main";
2996
+ } catch {
2997
+ return "main";
2998
+ }
2999
+ }
2972
3000
  function getStatusIcon(status) {
2973
3001
  switch (status) {
2974
3002
  case "queued":
@@ -4798,10 +4826,29 @@ async function execute(atomId, options) {
4798
4826
  if (options.cloud) {
4799
4827
  const projectName = basename(cwd);
4800
4828
  console.log(chalk3.dim(`Queueing cloud execution for ${atomId}...`));
4829
+ const repoUrl = await getGitRemoteUrl(cwd);
4830
+ const repoBranch = await getGitBranch(cwd);
4831
+ if (!repoUrl) {
4832
+ console.error(chalk3.red("No git remote found. Cloud execution requires a GitHub repository."));
4833
+ console.log(chalk3.dim("Add a remote with: git remote add origin <url>"));
4834
+ process.exit(1);
4835
+ }
4836
+ const atom2 = await loadAtom(atomId);
4837
+ if (!atom2) {
4838
+ console.error(chalk3.red(`Atom ${atomId} not found.`));
4839
+ process.exit(1);
4840
+ }
4801
4841
  try {
4802
- const executionId = await queueCloudExecution(atomId, projectName);
4842
+ const executionId = await queueCloudExecution(atomId, projectName, {
4843
+ repoUrl,
4844
+ repoBranch,
4845
+ atomData: atom2
4846
+ });
4803
4847
  console.log(chalk3.green(`
4804
4848
  \u2713 Execution queued (ID: ${executionId.slice(0, 8)})`));
4849
+ console.log(chalk3.dim(`
4850
+ Repository: ${repoUrl}`));
4851
+ console.log(chalk3.dim(`Branch: ${repoBranch}`));
4805
4852
  console.log(chalk3.dim("\nYou can close your terminal. Check status with:"));
4806
4853
  console.log(chalk3.bold(" archon cloud status"));
4807
4854
  console.log(chalk3.dim("\nOr view logs with:"));
@@ -5079,7 +5126,9 @@ async function watchCloudExecution(executionId) {
5079
5126
  const logs = data.logs ?? [];
5080
5127
  for (let i = lastLogCount; i < logs.length; i++) {
5081
5128
  const log = logs[i];
5082
- console.log(chalk3.dim(`[${log.timestamp}]`), log.message);
5129
+ if (log) {
5130
+ console.log(chalk3.dim(`[${log.timestamp}]`), log.message);
5131
+ }
5083
5132
  }
5084
5133
  lastLogCount = logs.length;
5085
5134
  if (data.status === "completed") {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  execute
3
- } from "./chunk-3WEJ3DXM.js";
3
+ } from "./chunk-XRWIU3RD.js";
4
4
  import "./chunk-M4LGRTLC.js";
5
5
  import "./chunk-UZT2L27M.js";
6
6
  import "./chunk-5IQKC2TD.js";