davia 0.1.6-alpha.1 → 0.1.7

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.
@@ -1,8 +1,14 @@
1
+ export interface AdditionalFile {
2
+ folderPath: string;
3
+ fileName: string;
4
+ content: string;
5
+ }
1
6
  export interface AgentConfig {
2
7
  name: string;
3
8
  folderPath: string;
4
9
  fileName: string;
5
10
  frontmatter: string;
11
+ additionalFiles?: AdditionalFile[];
6
12
  }
7
13
  export declare const SUPPORTED_AGENTS: Record<string, AgentConfig>;
8
14
  export declare function isValidAgent(agentType: string): boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"agent-rule.d.ts","sourceRoot":"","sources":["../../src/agentic-ide-options/agent-rule.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAmBxD,CAAC;AAEF,wBAAgB,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAEvD;AAED,wBAAgB,sBAAsB,IAAI,MAAM,CAE/C;AAED,wBAAgB,kBAAkB,IAAI,MAAM,CAgC3C"}
1
+ {"version":3,"file":"agent-rule.d.ts","sourceRoot":"","sources":["../../src/agentic-ide-options/agent-rule.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,cAAc;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,cAAc,EAAE,CAAC;CACpC;AAED,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CA2CxD,CAAC;AAEF,wBAAgB,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAEvD;AAED,wBAAgB,sBAAsB,IAAI,MAAM,CAE/C;AAED,wBAAgB,kBAAkB,IAAI,MAAM,CAgC3C"}
@@ -17,6 +17,25 @@ export const SUPPORTED_AGENTS = {
17
17
  fileName: "davia-documentation.md",
18
18
  frontmatter: "---\nagent: 'agent'\n---\n\n",
19
19
  },
20
+ "claude-code": {
21
+ name: "Claude Code",
22
+ folderPath: ".claude/skills/davia-documentation",
23
+ fileName: "SKILL.md",
24
+ frontmatter: "---\nname: davia-documentation\ndescription: Use whenever the user asks you to create, update, or read *documentation*/*Wiki* (docs, specs, design notes, API docs, etc.).\n---\n\n",
25
+ additionalFiles: [
26
+ {
27
+ folderPath: ".claude",
28
+ fileName: "settings.local.json",
29
+ content: JSON.stringify({
30
+ permissions: {
31
+ allow: ["Skill(davia-documentation)"],
32
+ deny: [],
33
+ ask: [],
34
+ },
35
+ }, null, 2),
36
+ },
37
+ ],
38
+ },
20
39
  };
21
40
  export function isValidAgent(agentType) {
22
41
  return agentType in SUPPORTED_AGENTS;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/agentic-ide-options/index.ts"],"names":[],"mappings":"AAUA;;;;GAIG;AACH,wBAAsB,gBAAgB,CACpC,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,IAAI,CAAC,CAmDf"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/agentic-ide-options/index.ts"],"names":[],"mappings":"AAUA;;;;GAIG;AACH,wBAAsB,gBAAgB,CACpC,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,IAAI,CAAC,CAiFf"}
@@ -32,6 +32,21 @@ export async function writeAgentConfig(projectRoot, agentType) {
32
32
  // Write the configuration file
33
33
  await fs.writeFile(targetFile, fileContent, "utf-8");
34
34
  console.log(chalk.green(`✓ Created ${agentConfig.name} configuration at ${path.relative(projectRoot, targetFile)}`));
35
+ // Write additional files if any
36
+ if (agentConfig.additionalFiles) {
37
+ for (const additionalFile of agentConfig.additionalFiles) {
38
+ const additionalDir = path.join(projectRoot, additionalFile.folderPath);
39
+ const additionalFilePath = path.join(additionalDir, additionalFile.fileName);
40
+ // Check if additional file already exists
41
+ if (await fs.pathExists(additionalFilePath)) {
42
+ console.log(chalk.yellow(`⚠️ ${additionalFile.fileName} already exists at ${path.relative(projectRoot, additionalFilePath)}`));
43
+ continue;
44
+ }
45
+ await fs.ensureDir(additionalDir);
46
+ await fs.writeFile(additionalFilePath, additionalFile.content, "utf-8");
47
+ console.log(chalk.green(`✓ Created ${additionalFile.fileName} at ${path.relative(projectRoot, additionalFilePath)}`));
48
+ }
49
+ }
35
50
  }
36
51
  catch (error) {
37
52
  console.error(chalk.red(`❌ Failed to create ${agentConfig.name} configuration: ${error instanceof Error ? error.message : String(error)}`));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "davia",
3
- "version": "0.1.6-alpha.1",
3
+ "version": "0.1.7",
4
4
  "license": "MIT",
5
5
  "description": "Interactive, editable docs designed for coding agents",
6
6
  "homepage": "https://davia.ai",
@@ -45,7 +45,7 @@
45
45
  "ora": "^9.0.0",
46
46
  "slug": "^11.0.1",
47
47
  "@davia/agent": "0.1.2",
48
- "@davia/web": "0.1.6-alpha.1"
48
+ "@davia/web": "0.1.7"
49
49
  },
50
50
  "devDependencies": {
51
51
  "@types/archiver": "^7.0.0",