@foggy-projects/deepseek-harness-plugin 0.4.2-rc.5 → 0.4.5-rc.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.
Files changed (53) hide show
  1. package/README.md +224 -185
  2. package/THIRD-PARTY-RUNTIME-NOTICES.md +16 -16
  3. package/cordis.patch.yml +6 -6
  4. package/docs/COMMUNITY-MARKETPLACES.md +64 -64
  5. package/docs/PUBLIC-BETA-READINESS.md +109 -109
  6. package/docs/RELEASE-CANDIDATE-0.4.0-RC.2.md +38 -38
  7. package/docs/RELEASE-CANDIDATE-0.4.0-RC.3.md +18 -18
  8. package/docs/RELEASE-CANDIDATE-0.4.1-DSH-0.1.5-RC.1.md +60 -60
  9. package/docs/RELEASE-CANDIDATE-0.4.2-DSH-0.1.7-RC.1.md +62 -62
  10. package/docs/RELEASE-CANDIDATE-0.4.2-DSH-0.1.7-RC.2.md +50 -50
  11. package/docs/RELEASE-CANDIDATE-0.4.2-DSH-0.1.7-RC.3.md +34 -34
  12. package/docs/RELEASE-CANDIDATE-0.4.2-DSH-0.1.7-RC.4.md +32 -32
  13. package/docs/RELEASE-CANDIDATE-0.4.2-DSH-0.1.7-RC.5.md +27 -27
  14. package/docs/RELEASE-CANDIDATE-0.4.3-DSH-0.2.0-RC.1.md +96 -0
  15. package/docs/RELEASE-CANDIDATE-0.4.4-DSH-0.2.1-RC.1.md +135 -0
  16. package/docs/RELEASE-CANDIDATE-0.4.5-DSH-0.2.2-RC.1.md +45 -0
  17. package/docs/WINDOWS-BETA-ACCEPTANCE.md +113 -113
  18. package/experience/linux/README.md +53 -53
  19. package/experience/linux/prepare.sh +4 -4
  20. package/lib/atomic-json.js +41 -41
  21. package/lib/client.js +1222 -1031
  22. package/lib/component-manager.js +164 -0
  23. package/lib/component-releases.js +363 -0
  24. package/lib/diagnostics.js +86 -86
  25. package/lib/index.js +764 -698
  26. package/lib/operation-lock.js +139 -0
  27. package/lib/python-runtime.js +339 -339
  28. package/lib/query-tool.js +134 -131
  29. package/lib/remote-descriptor.js +74 -59
  30. package/lib/remote.js +8 -8
  31. package/lib/runtime-settings.js +89 -89
  32. package/lib/skill-provider.js +116 -116
  33. package/lib/typert.js +9 -9
  34. package/lib/version.js +20 -20
  35. package/lib/viewer-preview.js +50 -27
  36. package/package.json +20 -16
  37. package/skills/foggy-deepseek-onboarding/SKILL.md +149 -143
  38. package/skills/foggy-deepseek-onboarding/assets/connection.schema.json +48 -48
  39. package/skills/foggy-deepseek-onboarding/assets/datasource.example.json +14 -14
  40. package/skills/foggy-deepseek-onboarding/assets/env.example +14 -14
  41. package/skills/foggy-deepseek-onboarding/assets/onboarding-state.schema.json +71 -71
  42. package/skills/foggy-deepseek-onboarding/assets/semantic-plan.example.json +8 -8
  43. package/skills/foggy-deepseek-onboarding/assets/semantic-plan.schema.json +21 -21
  44. package/skills/foggy-deepseek-onboarding/assets/versions.json +24 -24
  45. package/skills/foggy-deepseek-onboarding/references/onboarding-workflow.md +168 -168
  46. package/skills/foggy-deepseek-onboarding/scripts/doctor.ps1 +4 -4
  47. package/skills/foggy-deepseek-onboarding/scripts/install.ps1 +4 -4
  48. package/skills/foggy-deepseek-onboarding/scripts/invoke-onboarding.ps1 +32 -32
  49. package/skills/foggy-deepseek-onboarding/scripts/onboard.ps1 +4 -4
  50. package/skills/foggy-deepseek-onboarding/scripts/onboarding.py +3721 -3697
  51. package/skills/foggy-deepseek-onboarding/scripts/runtime-start.ps1 +4 -4
  52. package/skills/foggy-deepseek-onboarding/scripts/runtime-stop.ps1 +4 -4
  53. package/skills/foggy-deepseek-onboarding/scripts/uninstall.ps1 +4 -4
@@ -1,86 +1,86 @@
1
- import { open } from 'node:fs/promises'
2
- import { isAbsolute, join, relative, resolve, sep } from 'node:path'
3
-
4
- const DEFAULT_MAX_BYTES = 32 * 1024
5
- const DEFAULT_MAX_LINES = 120
6
- const ANSI_ESCAPE = /\u001b(?:\[[0-?]*[ -/]*[@-~]|\][^\u0007]*(?:\u0007|\u001b\\))/g
7
- const BEARER_SECRET = /\bBearer\s+[A-Za-z0-9._~+/=-]{8,}/gi
8
- const API_KEY_SECRET = /\bsk-[A-Za-z0-9._-]{12,}/g
9
- const JDBC_URL = /\bjdbc:[^\s"'<>]+/gi
10
- const URL_CREDENTIALS = /(\b[a-z][a-z0-9+.-]*:\/\/)[^\s/@:]+:[^\s/@]+@/gi
11
- const SENSITIVE_QUERY_VALUE = /([?&](?:password|passwd|pwd|secret|token|api[_-]?key|auth[_-]?code)=)[^&#\s]*/gi
12
- const SENSITIVE_ASSIGNMENT = /\b([A-Za-z0-9_.-]*(?:password|passwd|pwd|secret|token|api[_-]?key|authorization|auth[_-]?code)[A-Za-z0-9_.-]*)(\s*[:=]\s*)(?:"[^"]*"|'[^']*'|[^\s,;]+)/gi
13
-
14
- export function sanitizeDiagnosticText(value) {
15
- return String(value ?? '')
16
- .replace(ANSI_ESCAPE, '')
17
- .replace(BEARER_SECRET, 'Bearer [REDACTED]')
18
- .replace(API_KEY_SECRET, '[REDACTED_API_KEY]')
19
- .replace(JDBC_URL, 'jdbc:[REDACTED_CONNECTION_URL]')
20
- .replace(URL_CREDENTIALS, '$1[REDACTED]@')
21
- .replace(SENSITIVE_QUERY_VALUE, '$1[REDACTED]')
22
- .replace(SENSITIVE_ASSIGNMENT, '$1$2[REDACTED]')
23
- .replace(/[\u0000-\u0008\u000b\u000c\u000e-\u001f\u007f]/g, '')
24
- }
25
-
26
- function isInside(root, candidate) {
27
- const value = relative(resolve(root), resolve(candidate))
28
- return value !== '' && value !== '..' && !value.startsWith(`..${sep}`) && !isAbsolute(value)
29
- }
30
-
31
- export async function readDiagnosticLogTail(path, {
32
- allowedRoot,
33
- maxBytes = DEFAULT_MAX_BYTES,
34
- maxLines = DEFAULT_MAX_LINES,
35
- } = {}) {
36
- if (!path || !allowedRoot || !isInside(allowedRoot, path)) {
37
- return { sanitizedTail: '', tailTruncated: false, tailError: 'LOG_PATH_OUTSIDE_RUNTIME_ROOT' }
38
- }
39
-
40
- let handle
41
- try {
42
- handle = await open(path, 'r')
43
- const details = await handle.stat()
44
- const bytesToRead = Math.min(details.size, maxBytes)
45
- const buffer = Buffer.alloc(bytesToRead)
46
- if (bytesToRead > 0) await handle.read(buffer, 0, bytesToRead, details.size - bytesToRead)
47
- let text = buffer.toString('utf8')
48
- let truncated = details.size > bytesToRead
49
- if (truncated) {
50
- const firstLineEnd = text.indexOf('\n')
51
- if (firstLineEnd >= 0) text = text.slice(firstLineEnd + 1)
52
- }
53
- const lines = text.split(/\r?\n/)
54
- if (lines.length > maxLines) {
55
- text = lines.slice(-maxLines).join('\n')
56
- truncated = true
57
- }
58
- return {
59
- sanitizedTail: sanitizeDiagnosticText(text).trim(),
60
- tailTruncated: truncated,
61
- tailBytesRead: bytesToRead,
62
- }
63
- } catch (error) {
64
- return {
65
- sanitizedTail: '',
66
- tailTruncated: false,
67
- tailError: error?.code || 'LOG_READ_FAILED',
68
- }
69
- } finally {
70
- await handle?.close()
71
- }
72
- }
73
-
74
- export async function enrichRuntimeStartFailure(failure, dataRoot) {
75
- if (!failure || typeof failure !== 'object') return failure
76
- const runtimeRoot = join(dataRoot, 'runtime')
77
- const logs = Array.isArray(failure.logs)
78
- ? await Promise.all(failure.logs.map(async (entry) => ({
79
- ...entry,
80
- ...(entry?.exists && entry?.path
81
- ? await readDiagnosticLogTail(entry.path, { allowedRoot: runtimeRoot })
82
- : {}),
83
- })))
84
- : []
85
- return { ...failure, logs }
86
- }
1
+ import { open } from 'node:fs/promises'
2
+ import { isAbsolute, join, relative, resolve, sep } from 'node:path'
3
+
4
+ const DEFAULT_MAX_BYTES = 32 * 1024
5
+ const DEFAULT_MAX_LINES = 120
6
+ const ANSI_ESCAPE = /\u001b(?:\[[0-?]*[ -/]*[@-~]|\][^\u0007]*(?:\u0007|\u001b\\))/g
7
+ const BEARER_SECRET = /\bBearer\s+[A-Za-z0-9._~+/=-]{8,}/gi
8
+ const API_KEY_SECRET = /\bsk-[A-Za-z0-9._-]{12,}/g
9
+ const JDBC_URL = /\bjdbc:[^\s"'<>]+/gi
10
+ const URL_CREDENTIALS = /(\b[a-z][a-z0-9+.-]*:\/\/)[^\s/@:]+:[^\s/@]+@/gi
11
+ const SENSITIVE_QUERY_VALUE = /([?&](?:password|passwd|pwd|secret|token|api[_-]?key|auth[_-]?code)=)[^&#\s]*/gi
12
+ const SENSITIVE_ASSIGNMENT = /\b([A-Za-z0-9_.-]*(?:password|passwd|pwd|secret|token|api[_-]?key|authorization|auth[_-]?code)[A-Za-z0-9_.-]*)(\s*[:=]\s*)(?:"[^"]*"|'[^']*'|[^\s,;]+)/gi
13
+
14
+ export function sanitizeDiagnosticText(value) {
15
+ return String(value ?? '')
16
+ .replace(ANSI_ESCAPE, '')
17
+ .replace(BEARER_SECRET, 'Bearer [REDACTED]')
18
+ .replace(API_KEY_SECRET, '[REDACTED_API_KEY]')
19
+ .replace(JDBC_URL, 'jdbc:[REDACTED_CONNECTION_URL]')
20
+ .replace(URL_CREDENTIALS, '$1[REDACTED]@')
21
+ .replace(SENSITIVE_QUERY_VALUE, '$1[REDACTED]')
22
+ .replace(SENSITIVE_ASSIGNMENT, '$1$2[REDACTED]')
23
+ .replace(/[\u0000-\u0008\u000b\u000c\u000e-\u001f\u007f]/g, '')
24
+ }
25
+
26
+ function isInside(root, candidate) {
27
+ const value = relative(resolve(root), resolve(candidate))
28
+ return value !== '' && value !== '..' && !value.startsWith(`..${sep}`) && !isAbsolute(value)
29
+ }
30
+
31
+ export async function readDiagnosticLogTail(path, {
32
+ allowedRoot,
33
+ maxBytes = DEFAULT_MAX_BYTES,
34
+ maxLines = DEFAULT_MAX_LINES,
35
+ } = {}) {
36
+ if (!path || !allowedRoot || !isInside(allowedRoot, path)) {
37
+ return { sanitizedTail: '', tailTruncated: false, tailError: 'LOG_PATH_OUTSIDE_RUNTIME_ROOT' }
38
+ }
39
+
40
+ let handle
41
+ try {
42
+ handle = await open(path, 'r')
43
+ const details = await handle.stat()
44
+ const bytesToRead = Math.min(details.size, maxBytes)
45
+ const buffer = Buffer.alloc(bytesToRead)
46
+ if (bytesToRead > 0) await handle.read(buffer, 0, bytesToRead, details.size - bytesToRead)
47
+ let text = buffer.toString('utf8')
48
+ let truncated = details.size > bytesToRead
49
+ if (truncated) {
50
+ const firstLineEnd = text.indexOf('\n')
51
+ if (firstLineEnd >= 0) text = text.slice(firstLineEnd + 1)
52
+ }
53
+ const lines = text.split(/\r?\n/)
54
+ if (lines.length > maxLines) {
55
+ text = lines.slice(-maxLines).join('\n')
56
+ truncated = true
57
+ }
58
+ return {
59
+ sanitizedTail: sanitizeDiagnosticText(text).trim(),
60
+ tailTruncated: truncated,
61
+ tailBytesRead: bytesToRead,
62
+ }
63
+ } catch (error) {
64
+ return {
65
+ sanitizedTail: '',
66
+ tailTruncated: false,
67
+ tailError: error?.code || 'LOG_READ_FAILED',
68
+ }
69
+ } finally {
70
+ await handle?.close()
71
+ }
72
+ }
73
+
74
+ export async function enrichRuntimeStartFailure(failure, dataRoot) {
75
+ if (!failure || typeof failure !== 'object') return failure
76
+ const runtimeRoot = join(dataRoot, 'runtime')
77
+ const logs = Array.isArray(failure.logs)
78
+ ? await Promise.all(failure.logs.map(async (entry) => ({
79
+ ...entry,
80
+ ...(entry?.exists && entry?.path
81
+ ? await readDiagnosticLogTail(entry.path, { allowedRoot: runtimeRoot })
82
+ : {}),
83
+ })))
84
+ : []
85
+ return { ...failure, logs }
86
+ }