@zhixuan92/multi-model-agent-core 4.7.10 → 4.7.12
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.
- package/README.md +4 -5
- package/dist/bounded-execution/progress-watchdog.js +1 -1
- package/dist/bounded-execution/progress-watchdog.js.map +1 -1
- package/dist/bounded-execution/stall-watchdog.d.ts.map +1 -1
- package/dist/bounded-execution/stall-watchdog.js +28 -4
- package/dist/bounded-execution/stall-watchdog.js.map +1 -1
- package/dist/config/schema.d.ts +49 -2
- package/dist/config/schema.d.ts.map +1 -1
- package/dist/config/schema.js.map +1 -1
- package/dist/events/wire-schema.d.ts +17 -17
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/lifecycle/auto-commit.js +3 -3
- package/dist/lifecycle/auto-commit.js.map +1 -1
- package/dist/lifecycle/diff-tracker.js +4 -4
- package/dist/lifecycle/diff-tracker.js.map +1 -1
- package/dist/lifecycle/git-toplevel.d.ts.map +1 -1
- package/dist/lifecycle/git-toplevel.js +3 -0
- package/dist/lifecycle/git-toplevel.js.map +1 -1
- package/dist/lifecycle/handlers/commit-stage.js +5 -5
- package/dist/lifecycle/handlers/commit-stage.js.map +1 -1
- package/dist/lifecycle/handlers/git-commit-handler.js +1 -1
- package/dist/lifecycle/handlers/git-commit-handler.js.map +1 -1
- package/dist/lifecycle/handlers/implement-stage.js +2 -2
- package/dist/lifecycle/handlers/implement-stage.js.map +1 -1
- package/dist/lifecycle/merge-stage-stats.d.ts +1 -2
- package/dist/lifecycle/merge-stage-stats.d.ts.map +1 -1
- package/dist/lifecycle/merge-stage-stats.js.map +1 -1
- package/dist/lifecycle/real-diff.d.ts.map +1 -1
- package/dist/lifecycle/real-diff.js +2 -0
- package/dist/lifecycle/real-diff.js.map +1 -1
- package/dist/lifecycle/repo-hygiene.d.ts.map +1 -1
- package/dist/lifecycle/repo-hygiene.js +3 -0
- package/dist/lifecycle/repo-hygiene.js.map +1 -1
- package/dist/providers/codex-cli-session.d.ts.map +1 -1
- package/dist/providers/codex-cli-session.js +39 -22
- package/dist/providers/codex-cli-session.js.map +1 -1
- package/dist/reporting/commit-stage-runner.js +4 -4
- package/dist/reporting/commit-stage-runner.js.map +1 -1
- package/dist/tools/audit/schema.d.ts +2 -2
- package/dist/tools/debug/schema.d.ts +2 -2
- package/dist/tools/delegate/schema.d.ts +2 -2
- package/dist/tools/execute-plan/schema.d.ts +2 -2
- package/dist/tools/investigate/schema.d.ts +3 -3
- package/dist/tools/retry/schema.d.ts +2 -2
- package/dist/tools/review/schema.d.ts +2 -2
- package/dist/tools/shared-output.d.ts +2 -2
- package/dist/transport/http-listener.d.ts +6 -15
- package/dist/transport/http-listener.d.ts.map +1 -1
- package/dist/transport/http-listener.js +11 -22
- package/dist/transport/http-listener.js.map +1 -1
- package/dist/transport/index.d.ts +1 -1
- package/dist/transport/index.d.ts.map +1 -1
- package/dist/transport/index.js.map +1 -1
- package/dist/transport/route-dispatcher.d.ts +4 -17
- package/dist/transport/route-dispatcher.d.ts.map +1 -1
- package/dist/transport/route-dispatcher.js +8 -14
- package/dist/transport/route-dispatcher.js.map +1 -1
- package/dist/types/brief-quality-policy.d.ts +0 -1
- package/dist/types/brief-quality-policy.d.ts.map +1 -1
- package/dist/types/config.d.ts +2 -97
- package/dist/types/config.d.ts.map +1 -1
- package/dist/types/enums.d.ts +1 -108
- package/dist/types/enums.d.ts.map +1 -1
- package/dist/types/enums.js +9 -97
- package/dist/types/enums.js.map +1 -1
- package/dist/types/run-result.d.ts +2 -33
- package/dist/types/run-result.d.ts.map +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +2 -45
- package/dist/tool-surface/discover.d.ts +0 -29
- package/dist/tool-surface/discover.d.ts.map +0 -1
- package/dist/tool-surface/discover.js +0 -102
- package/dist/tool-surface/discover.js.map +0 -1
- package/dist/tool-surface/include-utils.d.ts +0 -27
- package/dist/tool-surface/include-utils.d.ts.map +0 -1
- package/dist/tool-surface/include-utils.js +0 -90
- package/dist/tool-surface/include-utils.js.map +0 -1
- package/dist/tool-surface/index.d.ts +0 -6
- package/dist/tool-surface/index.d.ts.map +0 -1
- package/dist/tool-surface/index.js +0 -7
- package/dist/tool-surface/index.js.map +0 -1
- package/dist/tool-surface/manifest.d.ts +0 -94
- package/dist/tool-surface/manifest.d.ts.map +0 -1
- package/dist/tool-surface/manifest.js +0 -234
- package/dist/tool-surface/manifest.js.map +0 -1
- package/dist/tool-surface/openapi-generator.d.ts +0 -15
- package/dist/tool-surface/openapi-generator.d.ts.map +0 -1
- package/dist/tool-surface/openapi-generator.js +0 -259
- package/dist/tool-surface/openapi-generator.js.map +0 -1
- package/dist/tool-surface/skill-installer-common.d.ts +0 -48
- package/dist/tool-surface/skill-installer-common.d.ts.map +0 -1
- package/dist/tool-surface/skill-installer-common.js +0 -195
- package/dist/tool-surface/skill-installer-common.js.map +0 -1
- package/dist/tool-surface/skill-installer.d.ts +0 -10
- package/dist/tool-surface/skill-installer.d.ts.map +0 -1
- package/dist/tool-surface/skill-installer.js +0 -20
- package/dist/tool-surface/skill-installer.js.map +0 -1
- package/dist/tool-surface/skill-installers/claude-code.d.ts +0 -43
- package/dist/tool-surface/skill-installers/claude-code.d.ts.map +0 -1
- package/dist/tool-surface/skill-installers/claude-code.js +0 -65
- package/dist/tool-surface/skill-installers/claude-code.js.map +0 -1
- package/dist/tool-surface/skill-installers/codex-cli.d.ts +0 -27
- package/dist/tool-surface/skill-installers/codex-cli.d.ts.map +0 -1
- package/dist/tool-surface/skill-installers/codex-cli.js +0 -84
- package/dist/tool-surface/skill-installers/codex-cli.js.map +0 -1
- package/dist/tool-surface/skill-installers/cursor.d.ts +0 -72
- package/dist/tool-surface/skill-installers/cursor.d.ts.map +0 -1
- package/dist/tool-surface/skill-installers/cursor.js +0 -81
- package/dist/tool-surface/skill-installers/cursor.js.map +0 -1
- package/dist/tool-surface/skill-installers/gemini-cli.d.ts +0 -66
- package/dist/tool-surface/skill-installers/gemini-cli.d.ts.map +0 -1
- package/dist/tool-surface/skill-installers/gemini-cli.js +0 -111
- package/dist/tool-surface/skill-installers/gemini-cli.js.map +0 -1
- package/dist/tool-surface/skill-manifest-sync.d.ts +0 -11
- package/dist/tool-surface/skill-manifest-sync.d.ts.map +0 -1
- package/dist/tool-surface/skill-manifest-sync.js +0 -65
- package/dist/tool-surface/skill-manifest-sync.js.map +0 -1
- package/dist/types/draft-task.d.ts +0 -60
- package/dist/types/draft-task.d.ts.map +0 -1
- package/dist/types/draft-task.js +0 -2
- package/dist/types/draft-task.js.map +0 -1
package/dist/types/enums.d.ts
CHANGED
|
@@ -1,48 +1,13 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
export declare const TierEnum: z.ZodEnum<{
|
|
3
|
-
standard: "standard";
|
|
4
|
-
complex: "complex";
|
|
5
|
-
}>;
|
|
6
|
-
export declare const RouteEnum: z.ZodEnum<{
|
|
7
|
-
review: "review";
|
|
8
|
-
delegate: "delegate";
|
|
9
|
-
audit: "audit";
|
|
10
|
-
debug: "debug";
|
|
11
|
-
investigate: "investigate";
|
|
12
|
-
"execute-plan": "execute-plan";
|
|
13
|
-
retry: "retry";
|
|
14
|
-
research: "research";
|
|
15
|
-
"register-context-block": "register-context-block";
|
|
16
|
-
}>;
|
|
17
|
-
export declare const ProviderTypeEnum: z.ZodEnum<{
|
|
18
|
-
claude: "claude";
|
|
19
|
-
codex: "codex";
|
|
20
|
-
}>;
|
|
21
|
-
export declare const InternalRunStatusEnum: z.ZodEnum<{
|
|
22
|
-
error: "error";
|
|
23
|
-
timeout: "timeout";
|
|
24
|
-
incomplete: "incomplete";
|
|
25
|
-
brief_too_vague: "brief_too_vague";
|
|
26
|
-
ok: "ok";
|
|
27
|
-
unavailable: "unavailable";
|
|
28
|
-
}>;
|
|
29
2
|
export declare const ReviewVerdictEnum: z.ZodEnum<{
|
|
3
|
+
error: "error";
|
|
30
4
|
approved: "approved";
|
|
31
5
|
concerns: "concerns";
|
|
32
6
|
changes_required: "changes_required";
|
|
33
7
|
annotated: "annotated";
|
|
34
|
-
error: "error";
|
|
35
8
|
skipped: "skipped";
|
|
36
9
|
not_applicable: "not_applicable";
|
|
37
10
|
}>;
|
|
38
|
-
export declare const WorkerStatusEnum: z.ZodEnum<{
|
|
39
|
-
done: "done";
|
|
40
|
-
done_with_concerns: "done_with_concerns";
|
|
41
|
-
needs_context: "needs_context";
|
|
42
|
-
blocked: "blocked";
|
|
43
|
-
review_loop_capped: "review_loop_capped";
|
|
44
|
-
failed: "failed";
|
|
45
|
-
}>;
|
|
46
11
|
export declare const ConcernCategory: z.ZodEnum<{
|
|
47
12
|
other: "other";
|
|
48
13
|
security: "security";
|
|
@@ -60,76 +25,4 @@ export declare const ConcernCategory: z.ZodEnum<{
|
|
|
60
25
|
queue_hygiene: "queue_hygiene";
|
|
61
26
|
}>;
|
|
62
27
|
export type ConcernCategoryType = z.infer<typeof ConcernCategory>;
|
|
63
|
-
export declare const InvestigationConfidenceEnum: z.ZodEnum<{
|
|
64
|
-
low: "low";
|
|
65
|
-
medium: "medium";
|
|
66
|
-
high: "high";
|
|
67
|
-
}>;
|
|
68
|
-
export declare const FindingConfidenceSchema: z.ZodNumber;
|
|
69
|
-
export declare const EventTypeEnum: z.ZodEnum<{
|
|
70
|
-
batch_completed: "batch_completed";
|
|
71
|
-
batch_failed: "batch_failed";
|
|
72
|
-
heartbeat: "heartbeat";
|
|
73
|
-
fallback: "fallback";
|
|
74
|
-
worker_start: "worker_start";
|
|
75
|
-
turn_start: "turn_start";
|
|
76
|
-
tool_call: "tool_call";
|
|
77
|
-
text_emission: "text_emission";
|
|
78
|
-
turn_complete: "turn_complete";
|
|
79
|
-
escalation: "escalation";
|
|
80
|
-
escalation_unavailable: "escalation_unavailable";
|
|
81
|
-
fallback_unavailable: "fallback_unavailable";
|
|
82
|
-
"read_only_review.quality": "read_only_review.quality";
|
|
83
|
-
"read_only_review.terminal": "read_only_review.terminal";
|
|
84
|
-
review_decision: "review_decision";
|
|
85
|
-
stage_change: "stage_change";
|
|
86
|
-
stall_abort: "stall_abort";
|
|
87
|
-
task_completed: "task_completed";
|
|
88
|
-
task_started: "task_started";
|
|
89
|
-
time_check: "time_check";
|
|
90
|
-
verify_skipped: "verify_skipped";
|
|
91
|
-
verify_step: "verify_step";
|
|
92
|
-
}>;
|
|
93
|
-
export declare const ReviewEngineTypeEnum: z.ZodEnum<{
|
|
94
|
-
reviewer: "reviewer";
|
|
95
|
-
annotator: "annotator";
|
|
96
|
-
}>;
|
|
97
|
-
export declare const ResearchAdapterEnum: z.ZodEnum<{
|
|
98
|
-
arxiv: "arxiv";
|
|
99
|
-
semantic_scholar: "semantic_scholar";
|
|
100
|
-
web_fetch: "web_fetch";
|
|
101
|
-
rss: "rss";
|
|
102
|
-
github_search: "github_search";
|
|
103
|
-
web_search: "web_search";
|
|
104
|
-
}>;
|
|
105
|
-
export declare const IncompleteReasonEnum: z.ZodEnum<{
|
|
106
|
-
turn_cap: "turn_cap";
|
|
107
|
-
timeout: "timeout";
|
|
108
|
-
missing_sections: "missing_sections";
|
|
109
|
-
}>;
|
|
110
|
-
/**
|
|
111
|
-
* Forward-declared per spec enums.md §12. Consumed when the debug-report
|
|
112
|
-
* shape is widened to include an evidenceTrail (separate v4.x feature).
|
|
113
|
-
* Defined here so the closed-enum ratchet covers it before adoption.
|
|
114
|
-
*/
|
|
115
|
-
export declare const EvidenceKindEnum: z.ZodEnum<{
|
|
116
|
-
fix: "fix";
|
|
117
|
-
reproducer: "reproducer";
|
|
118
|
-
code_path: "code_path";
|
|
119
|
-
}>;
|
|
120
|
-
export declare const DiagLoopEnum: z.ZodEnum<{
|
|
121
|
-
diff: "diff";
|
|
122
|
-
spec: "spec";
|
|
123
|
-
quality: "quality";
|
|
124
|
-
}>;
|
|
125
|
-
export declare const DiagRoleEnum: z.ZodEnum<{
|
|
126
|
-
implementer: "implementer";
|
|
127
|
-
specReviewer: "specReviewer";
|
|
128
|
-
qualityReviewer: "qualityReviewer";
|
|
129
|
-
diffReviewer: "diffReviewer";
|
|
130
|
-
}>;
|
|
131
|
-
export declare const DiagReasonEnum: z.ZodEnum<{
|
|
132
|
-
transport_failure: "transport_failure";
|
|
133
|
-
not_configured: "not_configured";
|
|
134
|
-
}>;
|
|
135
28
|
//# sourceMappingURL=enums.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enums.d.ts","sourceRoot":"","sources":["../../src/types/enums.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"enums.d.ts","sourceRoot":"","sources":["../../src/types/enums.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,iBAAiB;;;;;;;;EAE5B,CAAC;AAEH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;EAI1B,CAAC;AAEH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC"}
|
package/dist/types/enums.js
CHANGED
|
@@ -1,105 +1,17 @@
|
|
|
1
|
-
// Closed Zod enums
|
|
1
|
+
// Closed Zod enums still consumed at runtime.
|
|
2
2
|
//
|
|
3
|
-
//
|
|
4
|
-
//
|
|
5
|
-
//
|
|
6
|
-
//
|
|
7
|
-
//
|
|
8
|
-
// re-declare.
|
|
9
|
-
//
|
|
10
|
-
// Ordering follows enums.md sections:
|
|
11
|
-
// §1 Identity & routing — TierEnum, RouteEnum, ProviderTypeEnum
|
|
12
|
-
// §2 Tool surface — (toolMode + reviewPolicy are TS string
|
|
13
|
-
// literal types in types/task-spec.ts)
|
|
14
|
-
// §3 Verdicts & status — InternalRunStatusEnum, ReviewVerdictEnum,
|
|
15
|
-
// WorkerStatusEnum
|
|
16
|
-
// §4 Errors — ErrorCodeSchema (lives in error-codes.ts
|
|
17
|
-
// next to retryableFor; not re-imported here
|
|
18
|
-
// to avoid a cycle with that helper module)
|
|
19
|
-
// §5 Findings — ConcernCategory; severity is a TS literal
|
|
20
|
-
// §6 Confidence — InvestigationConfidenceEnum, FindingConfidenceSchema
|
|
21
|
-
// §7 Events — EventTypeEnum
|
|
22
|
-
// §8 Capabilities — (modeled as TS literals on AgentConfig)
|
|
23
|
-
// §9 Tool category — ('toolCategory' is a TS literal on
|
|
24
|
-
// ToolSurfaceRegistry; not Zod)
|
|
25
|
-
// §10 Review engine — ReviewEngineTypeEnum
|
|
26
|
-
// §11 Research substrate — ResearchAdapterEnum
|
|
27
|
-
// §12 Diagnostics — IncompleteReasonEnum, EvidenceKindEnum
|
|
28
|
-
// §13 Diagnostic discriminators — DiagLoopEnum, DiagRoleEnum, DiagReasonEnum
|
|
3
|
+
// Only the enums with live consumers remain: ReviewVerdictEnum (terminal
|
|
4
|
+
// output schema, tools/shared-output.ts) and ConcernCategory + its inferred
|
|
5
|
+
// ConcernCategoryType (wire telemetry, events/wire-schema.ts). The earlier
|
|
6
|
+
// spec-mirroring set of closed enums was removed once it had no consumers;
|
|
7
|
+
// re-add an enum here when a feature actually wires it.
|
|
29
8
|
import { z } from 'zod';
|
|
30
|
-
// ── §1 Identity & routing ─────────────────────────────────────────────────
|
|
31
|
-
export const TierEnum = z.enum(['standard', 'complex']);
|
|
32
|
-
export const RouteEnum = z.enum([
|
|
33
|
-
'delegate', 'audit', 'review', 'debug', 'execute-plan', 'retry',
|
|
34
|
-
'investigate',
|
|
35
|
-
'register-context-block',
|
|
36
|
-
'research',
|
|
37
|
-
]);
|
|
38
|
-
export const ProviderTypeEnum = z.enum(['claude', 'codex']);
|
|
39
|
-
// ── §3 Verdicts & status ──────────────────────────────────────────────────
|
|
40
|
-
export const InternalRunStatusEnum = z.enum([
|
|
41
|
-
'ok', 'incomplete', 'timeout', 'error', 'brief_too_vague', 'unavailable',
|
|
42
|
-
]);
|
|
43
9
|
export const ReviewVerdictEnum = z.enum([
|
|
44
10
|
'approved', 'concerns', 'changes_required', 'annotated', 'error', 'skipped', 'not_applicable',
|
|
45
11
|
]);
|
|
46
|
-
export const WorkerStatusEnum = z.enum([
|
|
47
|
-
'done', 'done_with_concerns', 'needs_context', 'blocked',
|
|
48
|
-
'review_loop_capped', 'failed',
|
|
49
|
-
]);
|
|
50
|
-
// ── §5 Findings ───────────────────────────────────────────────────────────
|
|
51
12
|
export const ConcernCategory = z.enum([
|
|
52
|
-
'missing_test',
|
|
53
|
-
'
|
|
54
|
-
'
|
|
55
|
-
'style_lint',
|
|
56
|
-
'security',
|
|
57
|
-
'performance',
|
|
58
|
-
'maintainability',
|
|
59
|
-
'doc_gap',
|
|
60
|
-
'doc_drift',
|
|
61
|
-
'contract_violation',
|
|
62
|
-
'coverage_gap',
|
|
63
|
-
'dead_code',
|
|
64
|
-
'queue_hygiene',
|
|
65
|
-
'other',
|
|
66
|
-
]);
|
|
67
|
-
// ── §6 Confidence ─────────────────────────────────────────────────────────
|
|
68
|
-
export const InvestigationConfidenceEnum = z.enum(['low', 'medium', 'high']);
|
|
69
|
-
export const FindingConfidenceSchema = z.number().int().min(0).max(100);
|
|
70
|
-
// ── §7 Events ─────────────────────────────────────────────────────────────
|
|
71
|
-
// Wire-event discriminator. Inventory derived from observability-events.ts.
|
|
72
|
-
// Spec enums.md §7 enumerates these same 31 names — see that section if you
|
|
73
|
-
// need the phase grouping. New event kinds add here AND in the spec §7 table.
|
|
74
|
-
export const EventTypeEnum = z.enum([
|
|
75
|
-
'batch_completed', 'batch_failed', 'escalation', 'escalation_unavailable',
|
|
76
|
-
'fallback', 'fallback_unavailable',
|
|
77
|
-
'heartbeat', 'read_only_review.quality', 'read_only_review.terminal', 'review_decision',
|
|
78
|
-
'stage_change', 'stall_abort', 'task_completed', 'task_started', 'text_emission',
|
|
79
|
-
'time_check', 'tool_call', 'turn_complete', 'turn_start', 'verify_skipped', 'verify_step', 'worker_start',
|
|
80
|
-
]);
|
|
81
|
-
// ── §10 Review engine ─────────────────────────────────────────────────────
|
|
82
|
-
export const ReviewEngineTypeEnum = z.enum(['reviewer', 'annotator']);
|
|
83
|
-
// ── §11 Research substrate ────────────────────────────────────────────────
|
|
84
|
-
// Per spec enums.md §11: 6 research adapters. The four named adapters
|
|
85
|
-
// (arxiv, semantic_scholar, github_search, rss) wrap content-source
|
|
86
|
-
// parsing; web_search is Brave-backed; web_fetch is the generic
|
|
87
|
-
// hardened HTTPS GET (research/web-search.ts and research/web-fetch.ts).
|
|
88
|
-
export const ResearchAdapterEnum = z.enum([
|
|
89
|
-
'arxiv', 'semantic_scholar', 'github_search', 'rss', 'web_search', 'web_fetch',
|
|
90
|
-
]);
|
|
91
|
-
// ── §12 Diagnostics ───────────────────────────────────────────────────────
|
|
92
|
-
export const IncompleteReasonEnum = z.enum(['turn_cap', 'timeout', 'missing_sections']);
|
|
93
|
-
/**
|
|
94
|
-
* Forward-declared per spec enums.md §12. Consumed when the debug-report
|
|
95
|
-
* shape is widened to include an evidenceTrail (separate v4.x feature).
|
|
96
|
-
* Defined here so the closed-enum ratchet covers it before adoption.
|
|
97
|
-
*/
|
|
98
|
-
export const EvidenceKindEnum = z.enum(['reproducer', 'code_path', 'fix']);
|
|
99
|
-
// ── §13 Diagnostic discriminators ─────────────────────────────────────────
|
|
100
|
-
export const DiagLoopEnum = z.enum(['spec', 'quality', 'diff']);
|
|
101
|
-
export const DiagRoleEnum = z.enum([
|
|
102
|
-
'implementer', 'specReviewer', 'qualityReviewer', 'diffReviewer',
|
|
13
|
+
'missing_test', 'scope_creep', 'incomplete_impl', 'style_lint', 'security',
|
|
14
|
+
'performance', 'maintainability', 'doc_gap', 'doc_drift', 'contract_violation',
|
|
15
|
+
'coverage_gap', 'dead_code', 'queue_hygiene', 'other',
|
|
103
16
|
]);
|
|
104
|
-
export const DiagReasonEnum = z.enum(['transport_failure', 'not_configured']);
|
|
105
17
|
//# sourceMappingURL=enums.js.map
|
package/dist/types/enums.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enums.js","sourceRoot":"","sources":["../../src/types/enums.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"enums.js","sourceRoot":"","sources":["../../src/types/enums.ts"],"names":[],"mappings":"AAAA,8CAA8C;AAC9C,EAAE;AACF,yEAAyE;AACzE,4EAA4E;AAC5E,2EAA2E;AAC3E,2EAA2E;AAC3E,wDAAwD;AAExD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,IAAI,CAAC;IACtC,UAAU,EAAE,UAAU,EAAE,kBAAkB,EAAE,WAAW,EAAE,OAAO,EAAE,SAAS,EAAE,gBAAgB;CAC9F,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,IAAI,CAAC;IACpC,cAAc,EAAE,aAAa,EAAE,iBAAiB,EAAE,YAAY,EAAE,UAAU;IAC1E,aAAa,EAAE,iBAAiB,EAAE,SAAS,EAAE,WAAW,EAAE,oBAAoB;IAC9E,cAAc,EAAE,WAAW,EAAE,eAAe,EAAE,OAAO;CACtD,CAAC,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export type { ComposePayload as RunResult } from '../lifecycle/stage-io.js';
|
|
2
2
|
import type { TaskEnvelopeStore } from '../events/task-envelope.js';
|
|
3
|
+
import type { StageStatsMap } from './stage-stats.js';
|
|
3
4
|
export interface TokenUsage {
|
|
4
5
|
inputTokens: number;
|
|
5
6
|
outputTokens: number;
|
|
@@ -99,7 +100,7 @@ export interface RuntimeRunResult {
|
|
|
99
100
|
}>;
|
|
100
101
|
[key: string]: unknown;
|
|
101
102
|
};
|
|
102
|
-
stageStats?:
|
|
103
|
+
stageStats?: Partial<StageStatsMap>;
|
|
103
104
|
reviewVerdict?: string;
|
|
104
105
|
qualityReviewStatus?: string;
|
|
105
106
|
specReviewStatus?: string;
|
|
@@ -164,36 +165,4 @@ export interface ReviewRunOptions {
|
|
|
164
165
|
cacheHints?: CacheHints;
|
|
165
166
|
abortSignal?: AbortSignal;
|
|
166
167
|
}
|
|
167
|
-
/** Minimal shape for stageStats — enough for event-builder.ts to access
|
|
168
|
-
* stageStats.implementing, stageStats.review, etc. without TS errors.
|
|
169
|
-
* The full StageStatsMap lives in types/stage-stats.ts. */
|
|
170
|
-
export interface StageStatsShape {
|
|
171
|
-
implementing?: RawStageStatsShape;
|
|
172
|
-
review?: RawStageStatsShape & {
|
|
173
|
-
roundsUsed?: number;
|
|
174
|
-
};
|
|
175
|
-
rework?: RawStageStatsShape;
|
|
176
|
-
annotating?: RawStageStatsShape & {
|
|
177
|
-
outcome?: string;
|
|
178
|
-
skipReason?: string;
|
|
179
|
-
};
|
|
180
|
-
committing?: RawStageStatsShape;
|
|
181
|
-
}
|
|
182
|
-
export interface RawStageStatsShape {
|
|
183
|
-
entered?: boolean;
|
|
184
|
-
durationMs?: number | null;
|
|
185
|
-
costUSD?: number | null;
|
|
186
|
-
agentTier?: string | null;
|
|
187
|
-
modelFamily?: string | null;
|
|
188
|
-
model?: string | null;
|
|
189
|
-
maxIdleMs?: number | null;
|
|
190
|
-
totalIdleMs?: number | null;
|
|
191
|
-
inputTokens?: number | null;
|
|
192
|
-
outputTokens?: number | null;
|
|
193
|
-
cachedReadTokens?: number | null;
|
|
194
|
-
cachedNonReadTokens?: number | null;
|
|
195
|
-
turnCount?: number | null;
|
|
196
|
-
filesWrittenCount?: number | null;
|
|
197
|
-
activityEvents?: number | null;
|
|
198
|
-
}
|
|
199
168
|
//# sourceMappingURL=run-result.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run-result.d.ts","sourceRoot":"","sources":["../../src/types/run-result.ts"],"names":[],"mappings":"AAkBA,YAAY,EAAE,cAAc,IAAI,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAC5E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"run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xB;AAED,MAAM,WAAW,UAAU;IACzB,qBAAqB,CAAC,EAAE,OAAO,CAAC;CACjC;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,CAAC,EAAE,UAAU,GAAG,QAAQ,CAAC;IAC7B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,WAAW,CAAC,EAAE,WAAW,CAAC;CAC3B"}
|
package/dist/types.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export type { ReviewVerdict, StageName, RawStageStats, StageStatsMap, } from './types/stage-stats.js';
|
|
2
2
|
export type { ToolMode, SandboxPolicy, AgentType, Effort, CostTier, WorkerStatus, FormatConstraints, TaskSpec, } from './types/task-spec.js';
|
|
3
|
-
export type { AgentConfig,
|
|
3
|
+
export type { AgentConfig, CodexProviderConfig, ClaudeProviderConfig, ProviderConfig, ResearchConfig, MultiModelConfig, } from './types/config.js';
|
|
4
4
|
export type { Commit, RunResult, RuntimeRunResult, ReviewPromptParts, CacheHints, ReviewRunOptions, Provider, } from './types/run-result.js';
|
|
5
5
|
export type { ErrorCode } from './error-codes.js';
|
|
6
6
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAKA,YAAY,EACV,aAAa,EACb,SAAS,EACT,aAAa,EACb,aAAa,GACd,MAAM,wBAAwB,CAAC;AAEhC,YAAY,EACV,QAAQ,EACR,aAAa,EACb,SAAS,EACT,MAAM,EACN,QAAQ,EACR,YAAY,EACZ,iBAAiB,EACjB,QAAQ,GACT,MAAM,sBAAsB,CAAC;AAE9B,YAAY,EACV,WAAW,EACX,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAKA,YAAY,EACV,aAAa,EACb,SAAS,EACT,aAAa,EACb,aAAa,GACd,MAAM,wBAAwB,CAAC;AAEhC,YAAY,EACV,QAAQ,EACR,aAAa,EACb,SAAS,EACT,MAAM,EACN,QAAQ,EACR,YAAY,EACZ,iBAAiB,EACjB,QAAQ,GACT,MAAM,sBAAsB,CAAC;AAE9B,YAAY,EACV,WAAW,EACX,mBAAmB,EACnB,oBAAoB,EACpB,cAAc,EACd,cAAc,EACd,gBAAgB,GACjB,MAAM,mBAAmB,CAAC;AAE3B,YAAY,EACV,MAAM,EACN,SAAS,EACT,gBAAgB,EAChB,iBAAiB,EACjB,UAAU,EACV,gBAAgB,EAChB,QAAQ,GACT,MAAM,uBAAuB,CAAC;AAK/B,YAAY,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zhixuan92/multi-model-agent-core",
|
|
3
|
-
"version": "4.7.
|
|
3
|
+
"version": "4.7.12",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "Core library for multi-model-agent: provider runners (Claude, Codex, OpenAI-compatible), routing logic, config schema, and tool/sandbox primitives.",
|
|
@@ -236,46 +236,6 @@
|
|
|
236
236
|
"types": "./dist/events/consent-rules.d.ts",
|
|
237
237
|
"import": "./dist/events/consent-rules.js"
|
|
238
238
|
},
|
|
239
|
-
"./tool-surface/manifest": {
|
|
240
|
-
"types": "./dist/tool-surface/manifest.d.ts",
|
|
241
|
-
"import": "./dist/tool-surface/manifest.js"
|
|
242
|
-
},
|
|
243
|
-
"./tool-surface/discover": {
|
|
244
|
-
"types": "./dist/tool-surface/discover.d.ts",
|
|
245
|
-
"import": "./dist/tool-surface/discover.js"
|
|
246
|
-
},
|
|
247
|
-
"./tool-surface/include-utils": {
|
|
248
|
-
"types": "./dist/tool-surface/include-utils.d.ts",
|
|
249
|
-
"import": "./dist/tool-surface/include-utils.js"
|
|
250
|
-
},
|
|
251
|
-
"./tool-surface/skill-manifest-sync": {
|
|
252
|
-
"types": "./dist/tool-surface/skill-manifest-sync.d.ts",
|
|
253
|
-
"import": "./dist/tool-surface/skill-manifest-sync.js"
|
|
254
|
-
},
|
|
255
|
-
"./tool-surface/skill-installers/claude-code": {
|
|
256
|
-
"types": "./dist/tool-surface/skill-installers/claude-code.d.ts",
|
|
257
|
-
"import": "./dist/tool-surface/skill-installers/claude-code.js"
|
|
258
|
-
},
|
|
259
|
-
"./tool-surface/skill-installers/codex-cli": {
|
|
260
|
-
"types": "./dist/tool-surface/skill-installers/codex-cli.d.ts",
|
|
261
|
-
"import": "./dist/tool-surface/skill-installers/codex-cli.js"
|
|
262
|
-
},
|
|
263
|
-
"./tool-surface/skill-installers/cursor": {
|
|
264
|
-
"types": "./dist/tool-surface/skill-installers/cursor.d.ts",
|
|
265
|
-
"import": "./dist/tool-surface/skill-installers/cursor.js"
|
|
266
|
-
},
|
|
267
|
-
"./tool-surface/skill-installers/gemini-cli": {
|
|
268
|
-
"types": "./dist/tool-surface/skill-installers/gemini-cli.d.ts",
|
|
269
|
-
"import": "./dist/tool-surface/skill-installers/gemini-cli.js"
|
|
270
|
-
},
|
|
271
|
-
"./tool-surface/skill-installer": {
|
|
272
|
-
"types": "./dist/tool-surface/skill-installer.d.ts",
|
|
273
|
-
"import": "./dist/tool-surface/skill-installer.js"
|
|
274
|
-
},
|
|
275
|
-
"./tool-surface/openapi-generator": {
|
|
276
|
-
"types": "./dist/tool-surface/openapi-generator.d.ts",
|
|
277
|
-
"import": "./dist/tool-surface/openapi-generator.js"
|
|
278
|
-
},
|
|
279
239
|
"./events/wire-schema": {
|
|
280
240
|
"types": "./dist/events/wire-schema.d.ts",
|
|
281
241
|
"import": "./dist/events/wire-schema.js"
|
|
@@ -289,7 +249,7 @@
|
|
|
289
249
|
"node": ">=22.0.0"
|
|
290
250
|
},
|
|
291
251
|
"dependencies": {
|
|
292
|
-
"@anthropic-ai/claude-agent-sdk": "^0.
|
|
252
|
+
"@anthropic-ai/claude-agent-sdk": "^0.3.145",
|
|
293
253
|
"@mozilla/readability": "^0.6.0",
|
|
294
254
|
"cross-spawn": "^7.0.6",
|
|
295
255
|
"fast-xml-parser": "^5.7.2",
|
|
@@ -297,9 +257,6 @@
|
|
|
297
257
|
"undici": "^8.2.0",
|
|
298
258
|
"zod": "^4.0.0"
|
|
299
259
|
},
|
|
300
|
-
"overrides": {
|
|
301
|
-
"@anthropic-ai/sdk": "0.81.0"
|
|
302
|
-
},
|
|
303
260
|
"devDependencies": {
|
|
304
261
|
"@types/cross-spawn": "^6.0.6",
|
|
305
262
|
"@types/jsdom": "^28.0.1"
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import type { Client } from './manifest.js';
|
|
2
|
-
export declare const SUPPORTED_SKILLS: readonly ["multi-model-agent", "mma-delegate", "mma-audit", "mma-review", "mma-debug", "mma-execute-plan", "mma-retry", "mma-context-blocks", "mma-investigate", "mma-research", "mma-explore"];
|
|
3
|
-
/** Thrown when a skill's SKILL.md cannot be read from the bundled skills directory. */
|
|
4
|
-
export declare class SkillNotFoundError extends Error {
|
|
5
|
-
readonly code: "skill_not_found";
|
|
6
|
-
constructor(skillName: string, checkedPath: string);
|
|
7
|
-
}
|
|
8
|
-
export declare function skillsRootCandidates(here: string): string[];
|
|
9
|
-
export declare function pickSkillsRoot(here: string, exists?: (p: string) => boolean): string;
|
|
10
|
-
/**
|
|
11
|
-
* Return the absolute path to the skills root directory. Production: the
|
|
12
|
-
* bundled `packages/server/src/skills/` (or its dist mirror). Tests pass
|
|
13
|
-
* a fixture path explicitly.
|
|
14
|
-
*/
|
|
15
|
-
export declare function getSkillsRoot(skillsRoot?: string): string;
|
|
16
|
-
/**
|
|
17
|
-
* Read the content of a skill's SKILL.md file. Returns null if the file
|
|
18
|
-
* does not exist; propagates other I/O errors so callers can distinguish
|
|
19
|
-
* "skill not found" from "can't access skill".
|
|
20
|
-
*/
|
|
21
|
-
export declare function readSkillContent(skillName: string, skillsRoot?: string): string | null;
|
|
22
|
-
/**
|
|
23
|
-
* Return the per-client install directories where skills are written as
|
|
24
|
-
* subdirectories. Only includes clients that use the per-skill directory
|
|
25
|
-
* model (claude-code and codex). Gemini and Cursor bundle skills into a
|
|
26
|
-
* single file/extension and are not included.
|
|
27
|
-
*/
|
|
28
|
-
export declare function discoverPerClientInstallDirs(homeDir?: string): Partial<Record<Client, string>>;
|
|
29
|
-
//# sourceMappingURL=discover.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"discover.d.ts","sourceRoot":"","sources":["../../src/tool-surface/discover.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAE5C,eAAO,MAAM,gBAAgB,iMAYnB,CAAC;AAEX,uFAAuF;AACvF,qBAAa,kBAAmB,SAAQ,KAAK;IAC3C,QAAQ,CAAC,IAAI,EAAG,iBAAiB,CAAU;gBAC/B,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM;CAOnD;AAYD,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAgB3D;AAED,wBAAgB,cAAc,CAC5B,IAAI,EAAE,MAAM,EACZ,MAAM,GAAE,CAAC,CAAC,EAAE,MAAM,KAAK,OAAuB,GAC7C,MAAM,CAMR;AAID;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAEzD;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAQtF;AAED;;;;;GAKG;AACH,wBAAgB,4BAA4B,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAM9F"}
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
// Skill discovery — locates packaged SKILL.md files on disk and reads them.
|
|
2
|
-
// Extracted from cli/install-skill.ts as part of Ch 7 Task 39.
|
|
3
|
-
import fs from 'node:fs';
|
|
4
|
-
import os from 'node:os';
|
|
5
|
-
import path from 'node:path';
|
|
6
|
-
import { fileURLToPath } from 'node:url';
|
|
7
|
-
export const SUPPORTED_SKILLS = [
|
|
8
|
-
'multi-model-agent',
|
|
9
|
-
'mma-delegate',
|
|
10
|
-
'mma-audit',
|
|
11
|
-
'mma-review',
|
|
12
|
-
'mma-debug',
|
|
13
|
-
'mma-execute-plan',
|
|
14
|
-
'mma-retry',
|
|
15
|
-
'mma-context-blocks',
|
|
16
|
-
'mma-investigate',
|
|
17
|
-
'mma-research',
|
|
18
|
-
'mma-explore',
|
|
19
|
-
];
|
|
20
|
-
/** Thrown when a skill's SKILL.md cannot be read from the bundled skills directory. */
|
|
21
|
-
export class SkillNotFoundError extends Error {
|
|
22
|
-
code = 'skill_not_found';
|
|
23
|
-
constructor(skillName, checkedPath) {
|
|
24
|
-
super(`Skill '${skillName}' not found. ` +
|
|
25
|
-
`Checked: ${checkedPath}. ` +
|
|
26
|
-
`Available skills: ${SUPPORTED_SKILLS.join(', ')}`);
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
// Discover.ts lives in `packages/core/src/tool-surface/` (or its dist mirror).
|
|
30
|
-
// Skills are bundled by the server package at `packages/server/src/skills/`
|
|
31
|
-
// (copied to `packages/server/dist/skills/` at build time, then shipped on
|
|
32
|
-
// the `@zhixuan92/multi-model-agent` npm package as `dist/skills/`).
|
|
33
|
-
// Probe candidates for both monorepo dev layouts and the two npm-installed
|
|
34
|
-
// layouts (hoisted siblings, or core nested under server).
|
|
35
|
-
//
|
|
36
|
-
// Exported (and parameterized on `here` + `exists`) so the candidate logic
|
|
37
|
-
// can be unit-tested against fixtures that mimic each layout — the v4.0.1
|
|
38
|
-
// regression was a missing prod candidate.
|
|
39
|
-
export function skillsRootCandidates(here) {
|
|
40
|
-
return [
|
|
41
|
-
// Dev source: packages/core/src/tool-surface -> packages/server/src/skills
|
|
42
|
-
path.resolve(here, '..', '..', '..', 'server', 'src', 'skills'),
|
|
43
|
-
// Dev built: packages/core/dist/tool-surface -> packages/server/dist/skills
|
|
44
|
-
path.resolve(here, '..', '..', '..', 'server', 'dist', 'skills'),
|
|
45
|
-
// npm install (hoisted): node_modules/@zhixuan92/multi-model-agent-core/dist/tool-surface
|
|
46
|
-
// -> node_modules/@zhixuan92/multi-model-agent/dist/skills
|
|
47
|
-
path.resolve(here, '..', '..', '..', 'multi-model-agent', 'dist', 'skills'),
|
|
48
|
-
// npm install (core nested under server):
|
|
49
|
-
// .../multi-model-agent/node_modules/@zhixuan92/multi-model-agent-core/dist/tool-surface
|
|
50
|
-
// -> .../multi-model-agent/dist/skills
|
|
51
|
-
path.resolve(here, '..', '..', '..', '..', '..', 'dist', 'skills'),
|
|
52
|
-
// Last-resort fallback for any caller that bundles skills inside core.
|
|
53
|
-
path.resolve(here, '..', 'skills'),
|
|
54
|
-
];
|
|
55
|
-
}
|
|
56
|
-
export function pickSkillsRoot(here, exists = fs.existsSync) {
|
|
57
|
-
const candidates = skillsRootCandidates(here);
|
|
58
|
-
for (const c of candidates) {
|
|
59
|
-
if (exists(c))
|
|
60
|
-
return c;
|
|
61
|
-
}
|
|
62
|
-
return candidates[0];
|
|
63
|
-
}
|
|
64
|
-
const DEFAULT_SKILLS_ROOT = pickSkillsRoot(path.dirname(fileURLToPath(import.meta.url)));
|
|
65
|
-
/**
|
|
66
|
-
* Return the absolute path to the skills root directory. Production: the
|
|
67
|
-
* bundled `packages/server/src/skills/` (or its dist mirror). Tests pass
|
|
68
|
-
* a fixture path explicitly.
|
|
69
|
-
*/
|
|
70
|
-
export function getSkillsRoot(skillsRoot) {
|
|
71
|
-
return skillsRoot ?? DEFAULT_SKILLS_ROOT;
|
|
72
|
-
}
|
|
73
|
-
/**
|
|
74
|
-
* Read the content of a skill's SKILL.md file. Returns null if the file
|
|
75
|
-
* does not exist; propagates other I/O errors so callers can distinguish
|
|
76
|
-
* "skill not found" from "can't access skill".
|
|
77
|
-
*/
|
|
78
|
-
export function readSkillContent(skillName, skillsRoot) {
|
|
79
|
-
const skillFile = path.join(getSkillsRoot(skillsRoot), skillName, 'SKILL.md');
|
|
80
|
-
try {
|
|
81
|
-
return fs.readFileSync(skillFile, 'utf-8');
|
|
82
|
-
}
|
|
83
|
-
catch (err) {
|
|
84
|
-
if (err.code === 'ENOENT')
|
|
85
|
-
return null;
|
|
86
|
-
throw err;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
/**
|
|
90
|
-
* Return the per-client install directories where skills are written as
|
|
91
|
-
* subdirectories. Only includes clients that use the per-skill directory
|
|
92
|
-
* model (claude-code and codex). Gemini and Cursor bundle skills into a
|
|
93
|
-
* single file/extension and are not included.
|
|
94
|
-
*/
|
|
95
|
-
export function discoverPerClientInstallDirs(homeDir) {
|
|
96
|
-
const h = homeDir ?? os.homedir();
|
|
97
|
-
return {
|
|
98
|
-
'claude-code': path.join(h, '.claude', 'skills'),
|
|
99
|
-
'codex': path.join(h, '.codex', 'skills'),
|
|
100
|
-
};
|
|
101
|
-
}
|
|
102
|
-
//# sourceMappingURL=discover.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"discover.js","sourceRoot":"","sources":["../../src/tool-surface/discover.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,+DAA+D;AAC/D,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAGzC,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,mBAAmB;IACnB,cAAc;IACd,WAAW;IACX,YAAY;IACZ,WAAW;IACX,kBAAkB;IAClB,WAAW;IACX,oBAAoB;IACpB,iBAAiB;IACjB,cAAc;IACd,aAAa;CACL,CAA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|
|
1
|
-
/**
|
|
2
|
-
* Inline `@include _shared/<path>` directives in `content`.
|
|
3
|
-
*
|
|
4
|
-
* Each line matching `@include _shared/<path>` (space after `@include`) is
|
|
5
|
-
* replaced with the full content of `<skillsRoot>/_shared/<path>`.
|
|
6
|
-
*
|
|
7
|
-
* Security constraints:
|
|
8
|
-
* - Only paths beginning with `_shared/` are accepted.
|
|
9
|
-
* - The resolved path must stay within `<skillsRoot>/_shared/`.
|
|
10
|
-
* Path traversal attempts are rejected with a warning and the directive
|
|
11
|
-
* line is dropped.
|
|
12
|
-
*
|
|
13
|
-
* If a shared file is missing (ENOENT):
|
|
14
|
-
* - A warning is written to stderr.
|
|
15
|
-
* - The include line is removed from the output (not preserved).
|
|
16
|
-
* - Processing continues for remaining directives.
|
|
17
|
-
*
|
|
18
|
-
* Other I/O errors (permission denied, EISDIR, etc.) are re-thrown so the
|
|
19
|
-
* caller can distinguish them from a simple missing-file case.
|
|
20
|
-
*
|
|
21
|
-
* @param skillContext Used in warning messages to identify the skill context.
|
|
22
|
-
* @param content Raw skill content (may contain @include directives).
|
|
23
|
-
* @param skillsRoot Root directory containing `_shared/` sub-directory.
|
|
24
|
-
* @returns The content with directives inlined.
|
|
25
|
-
*/
|
|
26
|
-
export declare function inlineIncludes(skillContext: string, content: string, skillsRoot: string): string;
|
|
27
|
-
//# sourceMappingURL=include-utils.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"include-utils.d.ts","sourceRoot":"","sources":["../../src/tool-surface/include-utils.ts"],"names":[],"mappings":"AAiBA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,cAAc,CAC5B,YAAY,EAAE,MAAM,EACpB,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,MAAM,GACjB,MAAM,CA6DR"}
|