@wayai/cli 0.3.69 → 0.3.70
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/index.js +11 -58
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -9621,27 +9621,17 @@ var init_whoami = __esm({
|
|
|
9621
9621
|
var init_exports = {};
|
|
9622
9622
|
__export(init_exports, {
|
|
9623
9623
|
SKILL_INSTALL_CMD: () => SKILL_INSTALL_CMD,
|
|
9624
|
+
ensureHubsDir: () => ensureHubsDir,
|
|
9624
9625
|
initCommand: () => initCommand,
|
|
9625
|
-
parseArgs: () => parseArgs3
|
|
9626
|
-
writeWorkspaceFiles: () => writeWorkspaceFiles
|
|
9626
|
+
parseArgs: () => parseArgs3
|
|
9627
9627
|
});
|
|
9628
|
-
import {
|
|
9628
|
+
import { mkdirSync as mkdirSync5 } from "fs";
|
|
9629
9629
|
import path9 from "path";
|
|
9630
|
-
function
|
|
9631
|
-
const created = [];
|
|
9632
|
-
for (const { name, content } of SHIM_FILES) {
|
|
9633
|
-
const filePath = path9.join(gitRoot, name);
|
|
9634
|
-
if (!existsSync9(filePath)) {
|
|
9635
|
-
writeFileSync6(filePath, content);
|
|
9636
|
-
created.push(name);
|
|
9637
|
-
}
|
|
9638
|
-
}
|
|
9630
|
+
function ensureHubsDir(gitRoot) {
|
|
9639
9631
|
const hubsDir = resolveLayout(gitRoot).hubsDir;
|
|
9640
|
-
if (
|
|
9641
|
-
|
|
9642
|
-
|
|
9643
|
-
}
|
|
9644
|
-
return created;
|
|
9632
|
+
if (isDirectory(hubsDir)) return null;
|
|
9633
|
+
mkdirSync5(hubsDir, { recursive: true });
|
|
9634
|
+
return `${path9.relative(gitRoot, hubsDir)}/`;
|
|
9645
9635
|
}
|
|
9646
9636
|
function parseArgs3(args2) {
|
|
9647
9637
|
let orgId;
|
|
@@ -9680,9 +9670,9 @@ async function initCommand(args2) {
|
|
|
9680
9670
|
}
|
|
9681
9671
|
const gitRoot = findGitRoot();
|
|
9682
9672
|
if (gitRoot) {
|
|
9683
|
-
const
|
|
9684
|
-
if (
|
|
9685
|
-
console.log(`Created ${
|
|
9673
|
+
const createdDir = ensureHubsDir(gitRoot);
|
|
9674
|
+
if (createdDir) {
|
|
9675
|
+
console.log(`Created ${createdDir}`);
|
|
9686
9676
|
}
|
|
9687
9677
|
}
|
|
9688
9678
|
console.log(
|
|
@@ -9755,7 +9745,7 @@ Select organization [1-${organizations.length}]: `);
|
|
|
9755
9745
|
console.log(`
|
|
9756
9746
|
Wrote ${configPath3}`);
|
|
9757
9747
|
}
|
|
9758
|
-
var SKILL_INSTALL_CMD
|
|
9748
|
+
var SKILL_INSTALL_CMD;
|
|
9759
9749
|
var init_init = __esm({
|
|
9760
9750
|
"src/commands/init.ts"() {
|
|
9761
9751
|
"use strict";
|
|
@@ -9766,43 +9756,6 @@ var init_init = __esm({
|
|
|
9766
9756
|
init_layout();
|
|
9767
9757
|
init_utils();
|
|
9768
9758
|
SKILL_INSTALL_CMD = "mkdir -p .claude && npx skills add wayai-pro/wayai-skill -y";
|
|
9769
|
-
AGENTS_MD = `# WayAI Workspace
|
|
9770
|
-
|
|
9771
|
-
This is a WayAI hub-as-code workspace. Hub configuration is stored as files (\`hub.yaml\`, \`agents/*.yaml\`, \`agents/*.md\`) and synced bidirectionally with the WayAI platform via the \`wayai\` CLI.
|
|
9772
|
-
|
|
9773
|
-
**Always start by reading the WayAI skill.** Install it with \`${SKILL_INSTALL_CMD}\` if you haven't already; the skill covers:
|
|
9774
|
-
- Platform entities, hub types, AI modes, agent roles, connection types
|
|
9775
|
-
- Workflow (\`wayai update\` \u2192 \`wayai pull\` \u2192 edit \u2192 \`wayai push\`)
|
|
9776
|
-
- Common CLI commands and the decision matrix (CLI vs UI)
|
|
9777
|
-
- Repository structure and YAML shapes (\`hub.yaml\`, \`agents/<slug>.yaml\`)
|
|
9778
|
-
- Pointers to per-domain references (Connections, Agents, Resources, States, Outbound, Evals, Analytics, Templates)
|
|
9779
|
-
|
|
9780
|
-
Project-specific overrides live in \`AGENTS.local.md\` \u2014 read it after the skill if it exists.
|
|
9781
|
-
|
|
9782
|
-
This file is created once on \`wayai init\` and never overwritten \u2014 edit freely.
|
|
9783
|
-
`;
|
|
9784
|
-
CLAUDE_MD = `@AGENTS.md
|
|
9785
|
-
@AGENTS.local.md
|
|
9786
|
-
`;
|
|
9787
|
-
AGENTS_LOCAL_MD = `# Project-specific instructions
|
|
9788
|
-
|
|
9789
|
-
This file holds project-specific overrides and additional instructions for AI coding agents working on this hub. It is **never overwritten by \`wayai\` commands** \u2014 edit freely.
|
|
9790
|
-
|
|
9791
|
-
Use it for things like:
|
|
9792
|
-
|
|
9793
|
-
- Domain glossary and terminology specific to this hub
|
|
9794
|
-
- Business rules the AI should always apply
|
|
9795
|
-
- Conventions or constraints that override defaults in \`AGENTS.md\`
|
|
9796
|
-
- Notes about external systems, integrations, or quirks
|
|
9797
|
-
- Pointers to other repo files the agent should read first
|
|
9798
|
-
|
|
9799
|
-
Leave this file empty (or delete its body) if you have nothing to add \u2014 \`AGENTS.md\` is sufficient on its own.
|
|
9800
|
-
`;
|
|
9801
|
-
SHIM_FILES = [
|
|
9802
|
-
{ name: "AGENTS.md", content: AGENTS_MD },
|
|
9803
|
-
{ name: "CLAUDE.md", content: CLAUDE_MD },
|
|
9804
|
-
{ name: "AGENTS.local.md", content: AGENTS_LOCAL_MD }
|
|
9805
|
-
];
|
|
9806
9759
|
}
|
|
9807
9760
|
});
|
|
9808
9761
|
|