draftgo-cli 4.0.23 → 4.0.25

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 (38) hide show
  1. package/README.md +3 -1
  2. package/bin/draftgo.js +8 -8
  3. package/package.json +72 -72
  4. package/resources/custom-service-sdk/auth_test.go +1 -1
  5. package/resources/custom-service-sdk/manifest.json +11 -11
  6. package/resources/custom-service-sdk/platform.go +10 -3
  7. package/resources/custom-service-sdk/resources.go +1 -0
  8. package/resources/custom-service-sdk/resources_scope_test.go +10 -5
  9. package/resources/custom-service-sdk/sdk.go +4 -3
  10. package/resources/skill/SKILL.md +1 -1
  11. package/resources/skill/manifest.json +1 -1
  12. package/resources/skill/references/aihub.md +74 -74
  13. package/resources/skill/references/app-api.md +78 -78
  14. package/resources/skill/references/architecture.md +40 -40
  15. package/resources/skill/references/checkout.md +105 -105
  16. package/resources/skill/references/custom-services.md +4 -4
  17. package/resources/skill/references/data.md +168 -168
  18. package/resources/skill/references/methods.md +3 -0
  19. package/resources/skill/references/modules.md +47 -47
  20. package/resources/skill/references/runtime.md +95 -96
  21. package/resources/skill/story/SKILL.md +264 -264
  22. package/src/commands/help.js +72 -71
  23. package/src/commands/listTargets.js +12 -12
  24. package/src/commands/status.js +2 -2
  25. package/src/commands/uninstall.js +45 -45
  26. package/src/commands/update.js +24 -30
  27. package/src/customServices.js +5 -4
  28. package/src/detect.js +14 -14
  29. package/src/fsx.js +67 -67
  30. package/src/index.js +25 -25
  31. package/src/localRuntime/detect.js +76 -76
  32. package/src/localRuntime/mysqlClient.js +138 -138
  33. package/src/logger.js +37 -37
  34. package/src/mcp/client.js +586 -595
  35. package/src/mcp/hosts.js +520 -520
  36. package/src/mcp/protocol.js +167 -167
  37. package/src/prompt.js +94 -94
  38. package/src/updateCheck.js +16 -16
package/src/logger.js CHANGED
@@ -1,37 +1,37 @@
1
- 'use strict';
2
-
3
- // Minimal ANSI color helpers - no external deps.
4
- const isTTY = process.stdout && process.stdout.isTTY;
5
- const supportsColor = isTTY && !process.env.NO_COLOR;
6
- const isWindows = process.platform === 'win32';
7
- const wantsUnicode = process.env.DRAFTGO_UNICODE === '1';
8
- const useUnicode = wantsUnicode || !isWindows || process.env.TERM_PROGRAM === 'vscode' || process.env.WT_SESSION;
9
- const sym = useUnicode
10
- ? { info: '\u2139', ok: '\u2713', err: '\u2717', step: '\u2192' }
11
- : { info: 'i', ok: 'OK', err: 'x', step: '>' };
12
-
13
- const wrap = (code) => (s) => supportsColor ? `\x1b[${code}m${s}\x1b[0m` : String(s);
14
-
15
- const c = {
16
- bold: wrap(1),
17
- dim: wrap(2),
18
- red: wrap(31),
19
- green: wrap(32),
20
- yellow: wrap(33),
21
- blue: wrap(34),
22
- magenta: wrap(35),
23
- cyan: wrap(36),
24
- gray: wrap(90),
25
- };
26
-
27
- function info(msg) { console.log(`${c.cyan(sym.info)} ${msg}`); }
28
- function ok(msg) { console.log(`${c.green(sym.ok)} ${msg}`); }
29
- function warn(msg) { console.warn(`${c.yellow('!')} ${msg}`); }
30
- function err(msg) { console.error(`${c.red(sym.err)} ${msg}`); }
31
- function step(msg) { console.log(`${c.blue(sym.step)} ${msg}`); }
32
- function title(msg) { console.log(`
33
- ${c.bold(c.magenta(msg))}`); }
34
- function plain(msg) { console.log(msg); }
35
- function dim(msg) { console.log(c.dim(msg)); }
36
-
37
- module.exports = { c, info, ok, warn, err, step, title, plain, dim };
1
+ 'use strict';
2
+
3
+ // Minimal ANSI color helpers - no external deps.
4
+ const isTTY = process.stdout && process.stdout.isTTY;
5
+ const supportsColor = isTTY && !process.env.NO_COLOR;
6
+ const isWindows = process.platform === 'win32';
7
+ const wantsUnicode = process.env.DRAFTGO_UNICODE === '1';
8
+ const useUnicode = wantsUnicode || !isWindows || process.env.TERM_PROGRAM === 'vscode' || process.env.WT_SESSION;
9
+ const sym = useUnicode
10
+ ? { info: '\u2139', ok: '\u2713', err: '\u2717', step: '\u2192' }
11
+ : { info: 'i', ok: 'OK', err: 'x', step: '>' };
12
+
13
+ const wrap = (code) => (s) => supportsColor ? `\x1b[${code}m${s}\x1b[0m` : String(s);
14
+
15
+ const c = {
16
+ bold: wrap(1),
17
+ dim: wrap(2),
18
+ red: wrap(31),
19
+ green: wrap(32),
20
+ yellow: wrap(33),
21
+ blue: wrap(34),
22
+ magenta: wrap(35),
23
+ cyan: wrap(36),
24
+ gray: wrap(90),
25
+ };
26
+
27
+ function info(msg) { console.log(`${c.cyan(sym.info)} ${msg}`); }
28
+ function ok(msg) { console.log(`${c.green(sym.ok)} ${msg}`); }
29
+ function warn(msg) { console.warn(`${c.yellow('!')} ${msg}`); }
30
+ function err(msg) { console.error(`${c.red(sym.err)} ${msg}`); }
31
+ function step(msg) { console.log(`${c.blue(sym.step)} ${msg}`); }
32
+ function title(msg) { console.log(`
33
+ ${c.bold(c.magenta(msg))}`); }
34
+ function plain(msg) { console.log(msg); }
35
+ function dim(msg) { console.log(c.dim(msg)); }
36
+
37
+ module.exports = { c, info, ok, warn, err, step, title, plain, dim };