@kodax-ai/kodax 0.7.76 → 0.7.78

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 (130) hide show
  1. package/CHANGELOG.md +758 -371
  2. package/LICENSE +158 -158
  3. package/README.md +1702 -1508
  4. package/README_CN.md +1019 -869
  5. package/config-templates/config.example.jsonc +86 -4
  6. package/config-templates/integrations/a2a.example.jsonc +98 -98
  7. package/config-templates/integrations/extensions.example.jsonc +7 -7
  8. package/config-templates/integrations/mcp.example.jsonc +16 -16
  9. package/dist/builtin/code-review/SKILL.md +22 -22
  10. package/dist/builtin/skill-creator/scripts/aggregate-benchmark.d.ts +46 -46
  11. package/dist/builtin/skill-creator/scripts/analyze-benchmark.d.ts +46 -46
  12. package/dist/builtin/skill-creator/scripts/compare-runs.d.ts +62 -62
  13. package/dist/builtin/skill-creator/scripts/generate-review.d.ts +33 -33
  14. package/dist/builtin/skill-creator/scripts/grade-evals.d.ts +73 -73
  15. package/dist/builtin/skill-creator/scripts/improve-description.d.ts +23 -23
  16. package/dist/builtin/skill-creator/scripts/init-skill.d.ts +14 -14
  17. package/dist/builtin/skill-creator/scripts/install-skill.d.ts +29 -29
  18. package/dist/builtin/skill-creator/scripts/package-skill.d.ts +38 -38
  19. package/dist/builtin/skill-creator/scripts/quick-validate.d.ts +8 -8
  20. package/dist/builtin/skill-creator/scripts/run-eval.d.ts +66 -66
  21. package/dist/builtin/skill-creator/scripts/run-loop.d.ts +49 -49
  22. package/dist/builtin/skill-creator/scripts/run-trigger-eval.d.ts +58 -58
  23. package/dist/chunks/agent-ASP4MS3X.js +2 -0
  24. package/dist/chunks/argument-completer-JYQ7FX3W.js +2 -0
  25. package/dist/chunks/chunk-2CFHBKRE.js +5 -0
  26. package/dist/chunks/chunk-35PPHOQ2.js +292 -0
  27. package/dist/chunks/chunk-43QNNDHR.js +29 -0
  28. package/dist/chunks/chunk-5BNQXXGY.js +1 -0
  29. package/dist/chunks/chunk-5GO6FH7L.js +458 -0
  30. package/dist/chunks/chunk-5NDCSFOP.js +78 -0
  31. package/dist/chunks/chunk-6FOJVETH.js +22 -0
  32. package/dist/chunks/chunk-6XM4B6K2.js +48 -0
  33. package/dist/chunks/chunk-6YZUE6NC.js +240 -0
  34. package/dist/chunks/{chunk-RDXRM3UI.js → chunk-7OEBJGHK.js} +1 -1
  35. package/dist/chunks/chunk-KQLQYHWU.js +386 -0
  36. package/dist/chunks/chunk-NXO6GWSY.js +46 -0
  37. package/dist/chunks/chunk-T2XZTLYE.js +316 -0
  38. package/dist/chunks/chunk-TQDBTTIM.js +348 -0
  39. package/dist/chunks/{chunk-SMT2JSM3.js → chunk-UID7BLAB.js} +9 -9
  40. package/dist/chunks/chunk-VAT2QYXM.js +765 -0
  41. package/dist/chunks/chunk-YAZQTC2L.js +5 -0
  42. package/dist/chunks/chunk-YVRYHC4C.js +655 -0
  43. package/dist/chunks/{chunk-PXKSE54E.js → chunk-Z3KFRTSB.js} +1 -1
  44. package/dist/chunks/compaction-config-BQSSIWK5.js +2 -0
  45. package/dist/chunks/{construction-bootstrap-5F5KF2BZ.js → construction-bootstrap-VQLQGWPY.js} +1 -1
  46. package/dist/chunks/dist-BFT5YIGU.js +2 -0
  47. package/dist/chunks/dist-PCFE24YP.js +2 -0
  48. package/dist/chunks/host-UTFXCYYM.js +2 -0
  49. package/dist/chunks/run-manager-PJU3WIFJ.js +2 -0
  50. package/dist/chunks/utils-SID4HW2Q.js +2 -0
  51. package/dist/index.d.ts +21 -19
  52. package/dist/index.js +6 -6
  53. package/dist/kodax_bootstrap.js +25 -25
  54. package/dist/kodax_cli.js +1787 -1341
  55. package/dist/kodax_resume.js +17 -17
  56. package/dist/provider-capabilities.json +392 -362
  57. package/dist/runtime-worker.js +1707 -1279
  58. package/dist/sandbox-workspace-session.js +563 -0
  59. package/dist/sdk-a2a.d.ts +18 -17
  60. package/dist/sdk-a2a.js +8 -8
  61. package/dist/sdk-agent.d.ts +320 -70
  62. package/dist/sdk-agent.js +1 -1
  63. package/dist/sdk-coding.d.ts +135 -168
  64. package/dist/sdk-coding.js +1 -1
  65. package/dist/sdk-experimental-memory.d.ts +14 -597
  66. package/dist/sdk-experimental-memory.js +1 -1
  67. package/dist/sdk-llm.d.ts +219 -6
  68. package/dist/sdk-llm.js +1 -1
  69. package/dist/sdk-mcp.js +1 -1
  70. package/dist/sdk-media.d.ts +1 -1
  71. package/dist/sdk-media.js +1 -1
  72. package/dist/sdk-repl.d.ts +70 -27
  73. package/dist/sdk-repl.js +2 -2
  74. package/dist/sdk-runtime.d.ts +212 -149
  75. package/dist/sdk-runtime.js +1 -1
  76. package/dist/sdk-sandbox.d.ts +93 -0
  77. package/dist/sdk-sandbox.js +2 -0
  78. package/dist/sdk-session.d.ts +8 -8
  79. package/dist/sdk-session.js +1 -1
  80. package/dist/sdk-skills.d.ts +2 -2
  81. package/dist/sdk-skills.js +1 -1
  82. package/dist/semantic-worker.js +15 -15
  83. package/dist/types-chunks/{base.d-ChvpaKjZ.d.ts → base.d-4e74xDdy.d.ts} +13 -1
  84. package/dist/types-chunks/{bash-prefix-extractor.d-r1beOESM.d.ts → bash-prefix-extractor.d-uAe2Oqda.d.ts} +319 -9
  85. package/dist/types-chunks/{capability-learning.d-DPrYxRjF.d.ts → capability-learning.d-CVsdHw4j.d.ts} +1 -1
  86. package/dist/types-chunks/{capsule.d-zeqV4IQX.d.ts → capsule.d-BlSv9l3V.d.ts} +2 -2
  87. package/dist/types-chunks/{guardrail.d-CWYD1bdL.d.ts → guardrail.d-BRE_ErEj.d.ts} +1 -1
  88. package/dist/types-chunks/{guardrail.d-qjuKJZ31.d.ts → guardrail.d-CXDYRgZ3.d.ts} +201 -35
  89. package/dist/types-chunks/{history-retrieval.d-BKTJIrVd.d.ts → history-retrieval.d-DtCy7x64.d.ts} +2 -2
  90. package/dist/types-chunks/{integration-config.d-ojG4swOP.d.ts → integration-config.d-BNowXE8k.d.ts} +23 -8
  91. package/dist/types-chunks/{public-api.d-CX4B11qY.d.ts → public-api.d-B3AohsxN.d.ts} +37 -8
  92. package/dist/types-chunks/{commands.d-DUxnK2TU.d.ts → repl.d-Ie_ZXb_U.d.ts} +89 -78
  93. package/dist/types-chunks/{side-query.d-DWTMsndP.d.ts → resolver.d-iAQ9ocLB.d.ts} +23 -74
  94. package/dist/types-chunks/{run-manager.d-B9fEIjZk.d.ts → run-manager.d-D1twIhF9.d.ts} +1 -1
  95. package/dist/types-chunks/{sdk-session-B0fhAOPa.d.ts → sdk-session-DB9KksIx.d.ts} +3 -3
  96. package/dist/types-chunks/side-query.d-DTuLPcC5.d.ts +77 -0
  97. package/dist/types-chunks/types-D3g6XUQr.d.ts +662 -0
  98. package/dist/types-chunks/{types.d-sRLugmjy.d.ts → types.d-BA-Jwpfs.d.ts} +506 -11
  99. package/dist/types-chunks/{types.d-DEctY20M.d.ts → types.d-BH0ZkTGf.d.ts} +2 -2
  100. package/dist/types-chunks/{types.d-DCQVBqVn.d.ts → types.d-BbtGlKZu.d.ts} +25 -3
  101. package/dist/types-chunks/{types.d-CSmF0t0n.d.ts → types.d-DIpZJKUl.d.ts} +15 -0
  102. package/dist/types-chunks/{types.d-Bm_y6YuM.d.ts → types.d-DVDTIfB_.d.ts} +4 -4
  103. package/dist/types-chunks/{utils.d-D0wPxz8y.d.ts → utils.d-CVp6bFl9.d.ts} +23 -7
  104. package/docs/SDK_EMBEDDER_GUIDE.md +592 -119
  105. package/package.json +9 -1
  106. package/scripts/kodax-bin.cjs +28 -28
  107. package/scripts/production-env.cjs +25 -25
  108. package/dist/chunks/agent-7X5CFET2.js +0 -2
  109. package/dist/chunks/argument-completer-3NHIKB4N.js +0 -2
  110. package/dist/chunks/chunk-4PWPNCNK.js +0 -158
  111. package/dist/chunks/chunk-7FJNLJLF.js +0 -369
  112. package/dist/chunks/chunk-COQYLD4U.js +0 -5
  113. package/dist/chunks/chunk-D3T24FJW.js +0 -78
  114. package/dist/chunks/chunk-EI4JBQKL.js +0 -46
  115. package/dist/chunks/chunk-HGT6WQ24.js +0 -321
  116. package/dist/chunks/chunk-HS3XHF3R.js +0 -622
  117. package/dist/chunks/chunk-IDCGNQ4H.js +0 -5
  118. package/dist/chunks/chunk-KAY2XLCP.js +0 -74
  119. package/dist/chunks/chunk-OD6LVXU6.js +0 -329
  120. package/dist/chunks/chunk-OSF3H4RR.js +0 -22
  121. package/dist/chunks/chunk-TGMBHGZO.js +0 -427
  122. package/dist/chunks/chunk-VWSLC2WO.js +0 -770
  123. package/dist/chunks/chunk-Y3AMP22L.js +0 -37
  124. package/dist/chunks/compaction-config-7J2XE35D.js +0 -2
  125. package/dist/chunks/dist-2RA7LSH3.js +0 -2
  126. package/dist/chunks/dist-URKXBOC6.js +0 -2
  127. package/dist/chunks/host-RKZ2OGFT.js +0 -2
  128. package/dist/chunks/run-manager-7RM4HEH6.js +0 -2
  129. package/dist/chunks/utils-X3TEH6IO.js +0 -2
  130. package/dist/types-chunks/center-types.d-BBT122uJ.d.ts +0 -91
@@ -1,62 +1,62 @@
1
- export interface CompareWorkspaceOptions {
2
- workspaceDir: string;
3
- configA?: string;
4
- configB?: string;
5
- outputPath?: string;
6
- markdownPath?: string;
7
- provider?: string;
8
- model?: string;
9
- reasoningMode?: string;
10
- maxIter?: number;
11
- maxPairs?: number;
12
- cwd?: string;
13
- }
14
-
15
- export function buildComparisonPrompt(input: Record<string, unknown>): string;
16
-
17
- export interface ComparisonSummary {
18
- total_pairs: number;
19
- config_a_wins: number;
20
- config_b_wins: number;
21
- ties: number;
22
- inconclusive: number;
23
- }
24
-
25
- export interface ComparisonEntry {
26
- index: number;
27
- eval_id: string | number | null;
28
- eval_name: string | null;
29
- run_a: string;
30
- run_b: string;
31
- presented_as: {
32
- A: string;
33
- B: string;
34
- };
35
- winner_label: 'A' | 'B' | 'tie' | 'inconclusive';
36
- winner_config: string;
37
- confidence: number;
38
- rationale: string;
39
- strengths_a: string[];
40
- strengths_b: string[];
41
- risks: string[];
42
- }
43
-
44
- export interface ComparisonDocument {
45
- workspace: string;
46
- generated_at: string;
47
- config_a: string;
48
- config_b: string;
49
- summary: ComparisonSummary;
50
- comparisons: ComparisonEntry[];
51
- }
52
-
53
- export function renderComparisonMarkdown(document: ComparisonDocument): string;
54
-
55
- export function compareWorkspace(
56
- options: CompareWorkspaceOptions,
57
- runner?: (prompt: string, options: Record<string, unknown>) => Promise<string>
58
- ): Promise<{
59
- document: ComparisonDocument;
60
- outputPath: string;
61
- markdownPath: string;
62
- }>;
1
+ export interface CompareWorkspaceOptions {
2
+ workspaceDir: string;
3
+ configA?: string;
4
+ configB?: string;
5
+ outputPath?: string;
6
+ markdownPath?: string;
7
+ provider?: string;
8
+ model?: string;
9
+ reasoningMode?: string;
10
+ maxIter?: number;
11
+ maxPairs?: number;
12
+ cwd?: string;
13
+ }
14
+
15
+ export function buildComparisonPrompt(input: Record<string, unknown>): string;
16
+
17
+ export interface ComparisonSummary {
18
+ total_pairs: number;
19
+ config_a_wins: number;
20
+ config_b_wins: number;
21
+ ties: number;
22
+ inconclusive: number;
23
+ }
24
+
25
+ export interface ComparisonEntry {
26
+ index: number;
27
+ eval_id: string | number | null;
28
+ eval_name: string | null;
29
+ run_a: string;
30
+ run_b: string;
31
+ presented_as: {
32
+ A: string;
33
+ B: string;
34
+ };
35
+ winner_label: 'A' | 'B' | 'tie' | 'inconclusive';
36
+ winner_config: string;
37
+ confidence: number;
38
+ rationale: string;
39
+ strengths_a: string[];
40
+ strengths_b: string[];
41
+ risks: string[];
42
+ }
43
+
44
+ export interface ComparisonDocument {
45
+ workspace: string;
46
+ generated_at: string;
47
+ config_a: string;
48
+ config_b: string;
49
+ summary: ComparisonSummary;
50
+ comparisons: ComparisonEntry[];
51
+ }
52
+
53
+ export function renderComparisonMarkdown(document: ComparisonDocument): string;
54
+
55
+ export function compareWorkspace(
56
+ options: CompareWorkspaceOptions,
57
+ runner?: (prompt: string, options: Record<string, unknown>) => Promise<string>
58
+ ): Promise<{
59
+ document: ComparisonDocument;
60
+ outputPath: string;
61
+ markdownPath: string;
62
+ }>;
@@ -1,33 +1,33 @@
1
- export interface ReviewOutput {
2
- name: string;
3
- kind: string;
4
- content?: string;
5
- dataUri?: string;
6
- }
7
-
8
- export interface ReviewRun {
9
- id: string;
10
- evalId: string | number | null;
11
- prompt: string;
12
- grading: Record<string, unknown> | null;
13
- outputs: ReviewOutput[];
14
- }
15
-
16
- export interface ReviewPayload {
17
- skillName: string;
18
- workspace: string;
19
- benchmark: Record<string, unknown> | null;
20
- feedback: Record<string, string>;
21
- runs: ReviewRun[];
22
- }
23
-
24
- export function findRuns(
25
- workspaceRoot: string,
26
- currentDir?: string,
27
- runs?: ReviewRun[]
28
- ): Promise<ReviewRun[]>;
29
- export function buildPayload(
30
- workspace: string,
31
- args: { skillName: string; benchmark?: string | null }
32
- ): Promise<ReviewPayload>;
33
- export function renderHtml(payload: ReviewPayload, staticMode: boolean): string;
1
+ export interface ReviewOutput {
2
+ name: string;
3
+ kind: string;
4
+ content?: string;
5
+ dataUri?: string;
6
+ }
7
+
8
+ export interface ReviewRun {
9
+ id: string;
10
+ evalId: string | number | null;
11
+ prompt: string;
12
+ grading: Record<string, unknown> | null;
13
+ outputs: ReviewOutput[];
14
+ }
15
+
16
+ export interface ReviewPayload {
17
+ skillName: string;
18
+ workspace: string;
19
+ benchmark: Record<string, unknown> | null;
20
+ feedback: Record<string, string>;
21
+ runs: ReviewRun[];
22
+ }
23
+
24
+ export function findRuns(
25
+ workspaceRoot: string,
26
+ currentDir?: string,
27
+ runs?: ReviewRun[]
28
+ ): Promise<ReviewRun[]>;
29
+ export function buildPayload(
30
+ workspace: string,
31
+ args: { skillName: string; benchmark?: string | null }
32
+ ): Promise<ReviewPayload>;
33
+ export function renderHtml(payload: ReviewPayload, staticMode: boolean): string;
@@ -1,73 +1,73 @@
1
- export interface GradeWorkspaceOptions {
2
- workspaceDir: string;
3
- provider?: string;
4
- model?: string;
5
- reasoningMode?: string;
6
- maxIter?: number;
7
- cwd?: string;
8
- overwrite?: boolean;
9
- configs?: string[];
10
- }
11
-
12
- export interface GradedExpectation {
13
- text: string;
14
- passed: boolean;
15
- evidence: string;
16
- }
17
-
18
- export interface GradingDocument {
19
- summary: {
20
- passed: number;
21
- failed: number;
22
- total: number;
23
- pass_rate: number;
24
- };
25
- expectations: GradedExpectation[];
26
- execution_metrics: {
27
- total_tool_calls: number;
28
- errors_encountered: number;
29
- output_chars: number;
30
- };
31
- user_notes_summary: {
32
- uncertainties: string[];
33
- needs_review: string[];
34
- workarounds: string[];
35
- };
36
- overall_summary: string;
37
- timing: {
38
- total_tokens: number;
39
- total_duration_seconds: number;
40
- };
41
- meta: {
42
- generated_at: string;
43
- eval_id: string | number | null;
44
- eval_name: string | null;
45
- config: string;
46
- run_id: string;
47
- };
48
- }
49
-
50
- export function buildGradingPrompt(input: Record<string, unknown>): string;
51
-
52
- export function gradeRun(
53
- runDir: string,
54
- options: GradeWorkspaceOptions,
55
- runner?: (prompt: string, options: Record<string, unknown>) => Promise<string>
56
- ): Promise<{
57
- runDir: string;
58
- grading: GradingDocument;
59
- prompt: string;
60
- rawResponse: string;
61
- }>;
62
-
63
- export function gradeWorkspace(
64
- options: GradeWorkspaceOptions,
65
- runner?: (prompt: string, options: Record<string, unknown>) => Promise<string>
66
- ): Promise<{
67
- workspace: string;
68
- generated_at: string;
69
- processed: number;
70
- skipped: number;
71
- processed_runs: Array<Record<string, unknown>>;
72
- skipped_runs: string[];
73
- }>;
1
+ export interface GradeWorkspaceOptions {
2
+ workspaceDir: string;
3
+ provider?: string;
4
+ model?: string;
5
+ reasoningMode?: string;
6
+ maxIter?: number;
7
+ cwd?: string;
8
+ overwrite?: boolean;
9
+ configs?: string[];
10
+ }
11
+
12
+ export interface GradedExpectation {
13
+ text: string;
14
+ passed: boolean;
15
+ evidence: string;
16
+ }
17
+
18
+ export interface GradingDocument {
19
+ summary: {
20
+ passed: number;
21
+ failed: number;
22
+ total: number;
23
+ pass_rate: number;
24
+ };
25
+ expectations: GradedExpectation[];
26
+ execution_metrics: {
27
+ total_tool_calls: number;
28
+ errors_encountered: number;
29
+ output_chars: number;
30
+ };
31
+ user_notes_summary: {
32
+ uncertainties: string[];
33
+ needs_review: string[];
34
+ workarounds: string[];
35
+ };
36
+ overall_summary: string;
37
+ timing: {
38
+ total_tokens: number;
39
+ total_duration_seconds: number;
40
+ };
41
+ meta: {
42
+ generated_at: string;
43
+ eval_id: string | number | null;
44
+ eval_name: string | null;
45
+ config: string;
46
+ run_id: string;
47
+ };
48
+ }
49
+
50
+ export function buildGradingPrompt(input: Record<string, unknown>): string;
51
+
52
+ export function gradeRun(
53
+ runDir: string,
54
+ options: GradeWorkspaceOptions,
55
+ runner?: (prompt: string, options: Record<string, unknown>) => Promise<string>
56
+ ): Promise<{
57
+ runDir: string;
58
+ grading: GradingDocument;
59
+ prompt: string;
60
+ rawResponse: string;
61
+ }>;
62
+
63
+ export function gradeWorkspace(
64
+ options: GradeWorkspaceOptions,
65
+ runner?: (prompt: string, options: Record<string, unknown>) => Promise<string>
66
+ ): Promise<{
67
+ workspace: string;
68
+ generated_at: string;
69
+ processed: number;
70
+ skipped: number;
71
+ processed_runs: Array<Record<string, unknown>>;
72
+ skipped_runs: string[];
73
+ }>;
@@ -1,23 +1,23 @@
1
- export interface ImproveDescriptionOptions {
2
- skillPath: string;
3
- evalResultsPath: string;
4
- provider?: string;
5
- model?: string;
6
- output?: string;
7
- write?: boolean;
8
- historyPath?: string;
9
- maxIter?: number;
10
- reasoningMode?: string;
11
- }
12
-
13
- export interface ImproveDescriptionResult {
14
- description: string;
15
- rawResponse: string;
16
- prompt: string;
17
- }
18
-
19
- export function extractDescriptionCandidate(text: string): string;
20
- export function improveDescription(
21
- options: ImproveDescriptionOptions,
22
- generator?: (prompt: string, options: ImproveDescriptionOptions) => Promise<string>
23
- ): Promise<ImproveDescriptionResult>;
1
+ export interface ImproveDescriptionOptions {
2
+ skillPath: string;
3
+ evalResultsPath: string;
4
+ provider?: string;
5
+ model?: string;
6
+ output?: string;
7
+ write?: boolean;
8
+ historyPath?: string;
9
+ maxIter?: number;
10
+ reasoningMode?: string;
11
+ }
12
+
13
+ export interface ImproveDescriptionResult {
14
+ description: string;
15
+ rawResponse: string;
16
+ prompt: string;
17
+ }
18
+
19
+ export function extractDescriptionCandidate(text: string): string;
20
+ export function improveDescription(
21
+ options: ImproveDescriptionOptions,
22
+ generator?: (prompt: string, options: ImproveDescriptionOptions) => Promise<string>
23
+ ): Promise<ImproveDescriptionResult>;
@@ -1,14 +1,14 @@
1
- export interface InitSkillOptions {
2
- name: string;
3
- baseDir?: string;
4
- description?: string;
5
- force?: boolean;
6
- includeEvals?: boolean;
7
- }
8
-
9
- export function renderSkillTemplate(name: string, description: string): string;
10
- export function renderEvalTemplate(name: string): string;
11
- export function initSkill(options: InitSkillOptions): Promise<{
12
- skillDir: string;
13
- created: string[];
14
- }>;
1
+ export interface InitSkillOptions {
2
+ name: string;
3
+ baseDir?: string;
4
+ description?: string;
5
+ force?: boolean;
6
+ includeEvals?: boolean;
7
+ }
8
+
9
+ export function renderSkillTemplate(name: string, description: string): string;
10
+ export function renderEvalTemplate(name: string): string;
11
+ export function initSkill(options: InitSkillOptions): Promise<{
12
+ skillDir: string;
13
+ created: string[];
14
+ }>;
@@ -1,29 +1,29 @@
1
- import type { SkillPackageManifest } from './package-skill.js';
2
-
3
- export interface InstalledSkillResult {
4
- skillName: string;
5
- installedTo: string;
6
- source: string;
7
- manifest: SkillPackageManifest | null;
8
- }
9
-
10
- export function readSkillPackageBuffer(buffer: Uint8Array): {
11
- skillName: string;
12
- manifest: SkillPackageManifest | null;
13
- entries: Array<{ relativePath: string; bytes: Uint8Array }>;
14
- };
15
-
16
- export function installSkillArchive(
17
- archivePath: string,
18
- options?: { skillsDir?: string; force?: boolean }
19
- ): Promise<InstalledSkillResult>;
20
-
21
- export function installSkillDirectory(
22
- skillDir: string,
23
- options?: { skillsDir?: string; force?: boolean }
24
- ): Promise<InstalledSkillResult>;
25
-
26
- export function installSkill(
27
- inputPath: string,
28
- options?: { skillsDir?: string; force?: boolean }
29
- ): Promise<InstalledSkillResult>;
1
+ import type { SkillPackageManifest } from './package-skill.js';
2
+
3
+ export interface InstalledSkillResult {
4
+ skillName: string;
5
+ installedTo: string;
6
+ source: string;
7
+ manifest: SkillPackageManifest | null;
8
+ }
9
+
10
+ export function readSkillPackageBuffer(buffer: Uint8Array): {
11
+ skillName: string;
12
+ manifest: SkillPackageManifest | null;
13
+ entries: Array<{ relativePath: string; bytes: Uint8Array }>;
14
+ };
15
+
16
+ export function installSkillArchive(
17
+ archivePath: string,
18
+ options?: { skillsDir?: string; force?: boolean }
19
+ ): Promise<InstalledSkillResult>;
20
+
21
+ export function installSkillDirectory(
22
+ skillDir: string,
23
+ options?: { skillsDir?: string; force?: boolean }
24
+ ): Promise<InstalledSkillResult>;
25
+
26
+ export function installSkill(
27
+ inputPath: string,
28
+ options?: { skillsDir?: string; force?: boolean }
29
+ ): Promise<InstalledSkillResult>;
@@ -1,38 +1,38 @@
1
- export interface PackagedSkillFile {
2
- path: string;
3
- size: number;
4
- sha256: string;
5
- }
6
-
7
- export interface SkillPackageManifest {
8
- format: 'kodax-skill-package';
9
- version: 1;
10
- created_at: string;
11
- entrypoint: 'SKILL.md';
12
- skill: {
13
- name: string;
14
- description: string;
15
- compatibility: string | null;
16
- user_invocable: boolean;
17
- disable_model_invocation: boolean;
18
- };
19
- files: PackagedSkillFile[];
20
- note: string;
21
- }
22
-
23
- export function createPackageManifest(
24
- skill: { frontmatter: Record<string, unknown> },
25
- files: Array<{ relativePath: string; bytes: Uint8Array; sha256: string }>,
26
- options?: { createdAt?: string }
27
- ): SkillPackageManifest;
28
-
29
- export function buildSkillPackage(
30
- skillDir: string,
31
- options?: { createdAt?: string }
32
- ): Promise<{ manifest: SkillPackageManifest; bytes: Uint8Array }>;
33
-
34
- export function writeSkillPackage(
35
- skillDir: string,
36
- outputPath: string,
37
- options?: { createdAt?: string }
38
- ): Promise<{ manifest: SkillPackageManifest; bytes: Uint8Array; outputPath: string }>;
1
+ export interface PackagedSkillFile {
2
+ path: string;
3
+ size: number;
4
+ sha256: string;
5
+ }
6
+
7
+ export interface SkillPackageManifest {
8
+ format: 'kodax-skill-package';
9
+ version: 1;
10
+ created_at: string;
11
+ entrypoint: 'SKILL.md';
12
+ skill: {
13
+ name: string;
14
+ description: string;
15
+ compatibility: string | null;
16
+ user_invocable: boolean;
17
+ disable_model_invocation: boolean;
18
+ };
19
+ files: PackagedSkillFile[];
20
+ note: string;
21
+ }
22
+
23
+ export function createPackageManifest(
24
+ skill: { frontmatter: Record<string, unknown> },
25
+ files: Array<{ relativePath: string; bytes: Uint8Array; sha256: string }>,
26
+ options?: { createdAt?: string }
27
+ ): SkillPackageManifest;
28
+
29
+ export function buildSkillPackage(
30
+ skillDir: string,
31
+ options?: { createdAt?: string }
32
+ ): Promise<{ manifest: SkillPackageManifest; bytes: Uint8Array }>;
33
+
34
+ export function writeSkillPackage(
35
+ skillDir: string,
36
+ outputPath: string,
37
+ options?: { createdAt?: string }
38
+ ): Promise<{ manifest: SkillPackageManifest; bytes: Uint8Array; outputPath: string }>;
@@ -1,8 +1,8 @@
1
- export interface SkillValidationResult {
2
- valid: boolean;
3
- errors: string[];
4
- warnings: string[];
5
- frontmatter: Record<string, unknown> | null;
6
- }
7
-
8
- export function validateSkillDirectory(skillDir: string): Promise<SkillValidationResult>;
1
+ export interface SkillValidationResult {
2
+ valid: boolean;
3
+ errors: string[];
4
+ warnings: string[];
5
+ frontmatter: Record<string, unknown> | null;
6
+ }
7
+
8
+ export function validateSkillDirectory(skillDir: string): Promise<SkillValidationResult>;