sf-agentpmd 0.1.0 → 0.1.2

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 (100) hide show
  1. package/NOTICE +7 -5
  2. package/dist/commands/agentpmd/analyze.js +4141 -109
  3. package/dist/commands/agentpmd/analyze.js.map +7 -1
  4. package/dist/commands/agentpmd/install-skill.js +42 -31
  5. package/dist/commands/agentpmd/install-skill.js.map +7 -1
  6. package/dist/index.js +4155 -3
  7. package/dist/index.js.map +7 -1
  8. package/oclif.manifest.json +2 -2
  9. package/package.json +7 -8
  10. package/dist/analyzer/action-references.d.ts +0 -21
  11. package/dist/analyzer/action-references.js +0 -130
  12. package/dist/analyzer/action-references.js.map +0 -1
  13. package/dist/analyzer/analyze.d.ts +0 -43
  14. package/dist/analyzer/analyze.js +0 -222
  15. package/dist/analyzer/analyze.js.map +0 -1
  16. package/dist/analyzer/apex-analyze.d.ts +0 -14
  17. package/dist/analyzer/apex-analyze.js +0 -60
  18. package/dist/analyzer/apex-analyze.js.map +0 -1
  19. package/dist/analyzer/apex-complexity.d.ts +0 -27
  20. package/dist/analyzer/apex-complexity.js +0 -133
  21. package/dist/analyzer/apex-complexity.js.map +0 -1
  22. package/dist/analyzer/apex-parse.d.ts +0 -39
  23. package/dist/analyzer/apex-parse.js +0 -32
  24. package/dist/analyzer/apex-parse.js.map +0 -1
  25. package/dist/analyzer/apex-resolve.d.ts +0 -32
  26. package/dist/analyzer/apex-resolve.js +0 -59
  27. package/dist/analyzer/apex-resolve.js.map +0 -1
  28. package/dist/analyzer/complexity.d.ts +0 -30
  29. package/dist/analyzer/complexity.js +0 -126
  30. package/dist/analyzer/complexity.js.map +0 -1
  31. package/dist/analyzer/parse.d.ts +0 -51
  32. package/dist/analyzer/parse.js +0 -143
  33. package/dist/analyzer/parse.js.map +0 -1
  34. package/dist/analyzer/project.d.ts +0 -12
  35. package/dist/analyzer/project.js +0 -51
  36. package/dist/analyzer/project.js.map +0 -1
  37. package/dist/analyzer/types.d.ts +0 -76
  38. package/dist/analyzer/types.js +0 -2
  39. package/dist/analyzer/types.js.map +0 -1
  40. package/dist/commands/agentpmd/analyze.d.ts +0 -20
  41. package/dist/commands/agentpmd/install-skill.d.ts +0 -11
  42. package/dist/index.d.ts +0 -3
  43. package/dist/renderers/csv.d.ts +0 -6
  44. package/dist/renderers/csv.js +0 -78
  45. package/dist/renderers/csv.js.map +0 -1
  46. package/dist/renderers/index.d.ts +0 -8
  47. package/dist/renderers/index.js +0 -25
  48. package/dist/renderers/index.js.map +0 -1
  49. package/dist/renderers/markdown.d.ts +0 -12
  50. package/dist/renderers/markdown.js +0 -233
  51. package/dist/renderers/markdown.js.map +0 -1
  52. package/dist/renderers/options.d.ts +0 -20
  53. package/dist/renderers/options.js +0 -2
  54. package/dist/renderers/options.js.map +0 -1
  55. package/dist/renderers/sarif.d.ts +0 -3
  56. package/dist/renderers/sarif.js +0 -131
  57. package/dist/renderers/sarif.js.map +0 -1
  58. package/dist/renderers/text.d.ts +0 -3
  59. package/dist/renderers/text.js +0 -243
  60. package/dist/renderers/text.js.map +0 -1
  61. package/vendor/agentscript-parser-javascript/dist/cst-node.d.ts +0 -83
  62. package/vendor/agentscript-parser-javascript/dist/cst-node.js +0 -238
  63. package/vendor/agentscript-parser-javascript/dist/errors.d.ts +0 -34
  64. package/vendor/agentscript-parser-javascript/dist/errors.js +0 -74
  65. package/vendor/agentscript-parser-javascript/dist/expressions.d.ts +0 -36
  66. package/vendor/agentscript-parser-javascript/dist/expressions.js +0 -682
  67. package/vendor/agentscript-parser-javascript/dist/highlighter.d.ts +0 -24
  68. package/vendor/agentscript-parser-javascript/dist/highlighter.js +0 -260
  69. package/vendor/agentscript-parser-javascript/dist/index.d.ts +0 -29
  70. package/vendor/agentscript-parser-javascript/dist/index.js +0 -35
  71. package/vendor/agentscript-parser-javascript/dist/lexer.d.ts +0 -60
  72. package/vendor/agentscript-parser-javascript/dist/lexer.js +0 -630
  73. package/vendor/agentscript-parser-javascript/dist/parse-mapping.d.ts +0 -46
  74. package/vendor/agentscript-parser-javascript/dist/parse-mapping.js +0 -549
  75. package/vendor/agentscript-parser-javascript/dist/parse-sequence.d.ts +0 -10
  76. package/vendor/agentscript-parser-javascript/dist/parse-sequence.js +0 -118
  77. package/vendor/agentscript-parser-javascript/dist/parse-statements.d.ts +0 -15
  78. package/vendor/agentscript-parser-javascript/dist/parse-statements.js +0 -519
  79. package/vendor/agentscript-parser-javascript/dist/parse-templates.d.ts +0 -15
  80. package/vendor/agentscript-parser-javascript/dist/parse-templates.js +0 -323
  81. package/vendor/agentscript-parser-javascript/dist/parser.d.ts +0 -65
  82. package/vendor/agentscript-parser-javascript/dist/parser.js +0 -163
  83. package/vendor/agentscript-parser-javascript/dist/recovery.d.ts +0 -51
  84. package/vendor/agentscript-parser-javascript/dist/recovery.js +0 -199
  85. package/vendor/agentscript-parser-javascript/dist/token.d.ts +0 -58
  86. package/vendor/agentscript-parser-javascript/dist/token.js +0 -62
  87. package/vendor/agentscript-parser-javascript/package.json +0 -19
  88. package/vendor/agentscript-types/dist/comment.d.ts +0 -11
  89. package/vendor/agentscript-types/dist/comment.js +0 -10
  90. package/vendor/agentscript-types/dist/cst.d.ts +0 -7
  91. package/vendor/agentscript-types/dist/cst.js +0 -8
  92. package/vendor/agentscript-types/dist/diagnostic.d.ts +0 -34
  93. package/vendor/agentscript-types/dist/diagnostic.js +0 -23
  94. package/vendor/agentscript-types/dist/index.d.ts +0 -9
  95. package/vendor/agentscript-types/dist/index.js +0 -10
  96. package/vendor/agentscript-types/dist/position.d.ts +0 -11
  97. package/vendor/agentscript-types/dist/position.js +0 -16
  98. package/vendor/agentscript-types/dist/syntax-node.d.ts +0 -39
  99. package/vendor/agentscript-types/dist/syntax-node.js +0 -8
  100. package/vendor/agentscript-types/package.json +0 -15
@@ -1,33 +1,44 @@
1
- import { SfCommand } from '@salesforce/sf-plugins-core';
2
- import { existsSync } from 'node:fs';
3
- // `cp` is stable since Node 16.7; the plugin runtime targets Node >= 20.
4
- // eslint-disable-next-line n/no-unsupported-features/node-builtins
5
- import { cp } from 'node:fs/promises';
6
- import { homedir } from 'node:os';
7
- import { join } from 'node:path';
8
- import { fileURLToPath } from 'node:url';
9
- const SKILL_DEST = join(homedir(), '.claude', 'skills', 'agentforcepmd');
10
- export default class AgentpmdInstallSkill extends SfCommand {
11
- static description = `Recursively copies the bundled skill tree (SKILL.md plus its references/
1
+ // src/commands/agentpmd/install-skill.ts
2
+ import { SfCommand } from "@salesforce/sf-plugins-core";
3
+ import { existsSync, lstatSync } from "node:fs";
4
+ import { cp, mkdir, rm } from "node:fs/promises";
5
+ import { homedir } from "node:os";
6
+ import { dirname, join } from "node:path";
7
+ import { fileURLToPath } from "node:url";
8
+ var SKILL_DEST = join(homedir(), ".claude", "skills", "agentforcepmd");
9
+ function isSymlink(p) {
10
+ try {
11
+ return lstatSync(p).isSymbolicLink();
12
+ } catch {
13
+ return false;
14
+ }
15
+ }
16
+ var AgentpmdInstallSkill = class extends SfCommand {
17
+ static description = `Recursively copies the bundled skill tree (SKILL.md plus its references/
12
18
  pages) to ~/.claude/skills/agentforcepmd/ so Claude Code can use it as a
13
- skill. Restart Claude Code (or reload skills) afterward to activate it.`;
14
- static examples = ['$ sf agentpmd install-skill'];
15
- static summary = 'Install the agentforcepmd Claude Code skill to ~/.claude/skills/.';
16
- async run() {
17
- // Resolve the skill source relative to this package's installed location.
18
- // Compiled file lives at dist/commands/agentpmd/install-skill.js. Joining
19
- // '..' from the file path strips the filename first, so reaching the
20
- // package root (above dist/) takes four hops: install-skill.js → agentpmd
21
- // commands dist <pkgRoot>.
22
- const pkgRoot = join(fileURLToPath(import.meta.url), '..', '..', '..', '..');
23
- const skillSrc = join(pkgRoot, 'skill');
24
- if (!existsSync(skillSrc)) {
25
- this.error(`Skill source not found at ${skillSrc} — is the package installed correctly?`);
26
- }
27
- await cp(skillSrc, SKILL_DEST, { recursive: true });
28
- this.log(`Skill installed to ${SKILL_DEST}`);
29
- this.log('Restart Claude Code (or reload skills) to activate.');
30
- return { installed: SKILL_DEST };
19
+ skill. Any existing install at that path (including a dev symlink into a
20
+ checkout) is replaced. Restart Claude Code (or reload skills) afterward.`;
21
+ static examples = ["$ sf agentpmd install-skill"];
22
+ static summary = "Install the agentforcepmd Claude Code skill to ~/.claude/skills/.";
23
+ async run() {
24
+ const pkgRoot = join(fileURLToPath(import.meta.url), "..", "..", "..", "..");
25
+ const skillSrc = join(pkgRoot, "skill");
26
+ if (!existsSync(skillSrc)) {
27
+ this.error(`Skill source not found at ${skillSrc} \u2014 is the package installed correctly?`);
31
28
  }
32
- }
33
- //# sourceMappingURL=install-skill.js.map
29
+ const wasSymlink = isSymlink(SKILL_DEST);
30
+ await rm(SKILL_DEST, { force: true, recursive: true });
31
+ await mkdir(dirname(SKILL_DEST), { recursive: true });
32
+ await cp(skillSrc, SKILL_DEST, { recursive: true });
33
+ if (wasSymlink) {
34
+ this.warn(`Replaced an existing symlink at ${SKILL_DEST} with a copy of the bundled skill.`);
35
+ }
36
+ this.log(`Skill installed to ${SKILL_DEST}`);
37
+ this.log("Restart Claude Code (or reload skills) to activate.");
38
+ return { installed: SKILL_DEST };
39
+ }
40
+ };
41
+ export {
42
+ AgentpmdInstallSkill as default
43
+ };
44
+ //# sourceMappingURL=install-skill.js.map
@@ -1 +1,7 @@
1
- {"version":3,"file":"install-skill.js","sourceRoot":"","sources":["../../../src/commands/agentpmd/install-skill.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,yEAAyE;AACzE,mEAAmE;AACnE,OAAO,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,MAAM,UAAU,GAAG,IAAI,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,eAAe,CAAC,CAAC;AAEzE,MAAM,CAAC,OAAO,OAAO,oBAAqB,SAAQ,SAAgC;IACzE,MAAM,CAAU,WAAW,GAAG;;wEAEiC,CAAC;IAChE,MAAM,CAAU,QAAQ,GAAG,CAAC,6BAA6B,CAAC,CAAC;IAC3D,MAAM,CAAU,OAAO,GAAG,mEAAmE,CAAC;IAE9F,KAAK,CAAC,GAAG;QACd,0EAA0E;QAC1E,0EAA0E;QAC1E,qEAAqE;QACrE,0EAA0E;QAC1E,iCAAiC;QACjC,MAAM,OAAO,GAAG,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;QAC7E,MAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAExC,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;YAC1B,IAAI,CAAC,KAAK,CAAC,6BAA6B,QAAQ,wCAAwC,CAAC,CAAC;QAC5F,CAAC;QAED,MAAM,EAAE,CAAC,QAAQ,EAAE,UAAU,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;QAEpD,IAAI,CAAC,GAAG,CAAC,sBAAsB,UAAU,EAAE,CAAC,CAAC;QAC7C,IAAI,CAAC,GAAG,CAAC,qDAAqD,CAAC,CAAC;QAEhE,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,CAAC;IACnC,CAAC"}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/commands/agentpmd/install-skill.ts"],
4
+ "sourcesContent": ["import { SfCommand } from '@salesforce/sf-plugins-core';\nimport { existsSync, lstatSync } from 'node:fs';\n// `cp`/`rm`/`mkdir` are stable since Node >= 16; the plugin runtime targets Node >= 20.\n// eslint-disable-next-line n/no-unsupported-features/node-builtins\nimport { cp, mkdir, rm } from 'node:fs/promises';\nimport { homedir } from 'node:os';\nimport { dirname, join } from 'node:path';\nimport { fileURLToPath } from 'node:url';\n\nconst SKILL_DEST = join(homedir(), '.claude', 'skills', 'agentforcepmd');\n\nfunction isSymlink(p: string): boolean {\n try {\n return lstatSync(p).isSymbolicLink();\n } catch {\n return false;\n }\n}\n\nexport default class AgentpmdInstallSkill extends SfCommand<{ installed: string }> {\n public static readonly description = `Recursively copies the bundled skill tree (SKILL.md plus its references/\npages) to ~/.claude/skills/agentforcepmd/ so Claude Code can use it as a\nskill. Any existing install at that path (including a dev symlink into a\ncheckout) is replaced. Restart Claude Code (or reload skills) afterward.`;\n public static readonly examples = ['$ sf agentpmd install-skill'];\n public static readonly summary = 'Install the agentforcepmd Claude Code skill to ~/.claude/skills/.';\n\n public async run(): Promise<{ installed: string }> {\n // Resolve the skill source relative to this package's installed location.\n // Compiled file lives at dist/commands/agentpmd/install-skill.js. Joining\n // '..' from the file path strips the filename first, so reaching the\n // package root (above dist/) takes four hops: install-skill.js \u2192 agentpmd\n // \u2192 commands \u2192 dist \u2192 <pkgRoot>.\n const pkgRoot = join(fileURLToPath(import.meta.url), '..', '..', '..', '..');\n const skillSrc = join(pkgRoot, 'skill');\n\n if (!existsSync(skillSrc)) {\n this.error(`Skill source not found at ${skillSrc} \u2014 is the package installed correctly?`);\n }\n\n // Clear any prior install first. node:fs cp refuses to overwrite a symlink\n // (e.g. a dev `ln -s` into a checkout) with a directory, and it won't prune\n // files removed upstream \u2014 so we replace the destination wholesale. rm on a\n // symlink unlinks the link only; it never follows into (or deletes) the\n // link's target.\n const wasSymlink = isSymlink(SKILL_DEST);\n await rm(SKILL_DEST, { force: true, recursive: true });\n await mkdir(dirname(SKILL_DEST), { recursive: true });\n await cp(skillSrc, SKILL_DEST, { recursive: true });\n\n if (wasSymlink) {\n this.warn(`Replaced an existing symlink at ${SKILL_DEST} with a copy of the bundled skill.`);\n }\n\n this.log(`Skill installed to ${SKILL_DEST}`);\n this.log('Restart Claude Code (or reload skills) to activate.');\n\n return { installed: SKILL_DEST };\n }\n}\n"],
5
+ "mappings": ";AAAA,SAAS,iBAAiB;AAC1B,SAAS,YAAY,iBAAiB;AAGtC,SAAS,IAAI,OAAO,UAAU;AAC9B,SAAS,eAAe;AACxB,SAAS,SAAS,YAAY;AAC9B,SAAS,qBAAqB;AAE9B,IAAM,aAAa,KAAK,QAAQ,GAAG,WAAW,UAAU,eAAe;AAEvE,SAAS,UAAU,GAAoB;AACrC,MAAI;AACF,WAAO,UAAU,CAAC,EAAE,eAAe;AAAA,EACrC,QAAQ;AACN,WAAO;AAAA,EACT;AACF;AAEA,IAAqB,uBAArB,cAAkD,UAAiC;AAAA,EACjF,OAAuB,cAAc;AAAA;AAAA;AAAA;AAAA,EAIrC,OAAuB,WAAW,CAAC,6BAA6B;AAAA,EAChE,OAAuB,UAAU;AAAA,EAEjC,MAAa,MAAsC;AAMjD,UAAM,UAAU,KAAK,cAAc,YAAY,GAAG,GAAG,MAAM,MAAM,MAAM,IAAI;AAC3E,UAAM,WAAW,KAAK,SAAS,OAAO;AAEtC,QAAI,CAAC,WAAW,QAAQ,GAAG;AACzB,WAAK,MAAM,6BAA6B,QAAQ,6CAAwC;AAAA,IAC1F;AAOA,UAAM,aAAa,UAAU,UAAU;AACvC,UAAM,GAAG,YAAY,EAAE,OAAO,MAAM,WAAW,KAAK,CAAC;AACrD,UAAM,MAAM,QAAQ,UAAU,GAAG,EAAE,WAAW,KAAK,CAAC;AACpD,UAAM,GAAG,UAAU,YAAY,EAAE,WAAW,KAAK,CAAC;AAElD,QAAI,YAAY;AACd,WAAK,KAAK,mCAAmC,UAAU,oCAAoC;AAAA,IAC7F;AAEA,SAAK,IAAI,sBAAsB,UAAU,EAAE;AAC3C,SAAK,IAAI,qDAAqD;AAE9D,WAAO,EAAE,WAAW,WAAW;AAAA,EACjC;AACF;",
6
+ "names": []
7
+ }