@marcoscale98/piewf-cli 5.14.1-fork.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.
- package/dist/src/bundles.d.ts +63 -0
- package/dist/src/bundles.js +619 -0
- package/dist/src/cli.d.ts +34 -0
- package/dist/src/cli.js +912 -0
- package/dist/src/doctor-cleanup.d.ts +41 -0
- package/dist/src/doctor-cleanup.js +659 -0
- package/dist/src/doctor.d.ts +113 -0
- package/dist/src/doctor.js +668 -0
- package/dist/src/session-inspector.d.ts +82 -0
- package/dist/src/session-inspector.js +454 -0
- package/package.json +52 -0
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { type AgentResourcePolicy, type WorkflowCatalogModelAlias, type WorkflowExtensionMetadata, type WorkflowFunction, type WorkflowSettings, type WorkflowSettingsSources } from "@marcoscale98/pi-extensible-workflows";
|
|
2
|
+
import { type WorkflowRegistryApi } from "@marcoscale98/pi-extensible-workflows";
|
|
3
|
+
export type DoctorSeverity = "error" | "warning";
|
|
4
|
+
export interface DoctorDiagnostic {
|
|
5
|
+
severity: DoctorSeverity;
|
|
6
|
+
code: string;
|
|
7
|
+
message: string;
|
|
8
|
+
source?: string;
|
|
9
|
+
hint?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface DoctorRole {
|
|
12
|
+
name: string;
|
|
13
|
+
path: string;
|
|
14
|
+
scope: "extension" | "global" | "project";
|
|
15
|
+
active: boolean;
|
|
16
|
+
overrides?: string;
|
|
17
|
+
overriddenBy?: string;
|
|
18
|
+
extension?: WorkflowExtensionMetadata;
|
|
19
|
+
}
|
|
20
|
+
export interface DoctorFunction {
|
|
21
|
+
name: string;
|
|
22
|
+
description: string;
|
|
23
|
+
valid: boolean;
|
|
24
|
+
}
|
|
25
|
+
export interface DoctorTrust {
|
|
26
|
+
required: boolean;
|
|
27
|
+
trusted: boolean;
|
|
28
|
+
source: string;
|
|
29
|
+
}
|
|
30
|
+
export interface DoctorRoleInspection {
|
|
31
|
+
role: string;
|
|
32
|
+
path: string;
|
|
33
|
+
model: {
|
|
34
|
+
provider: string;
|
|
35
|
+
model: string;
|
|
36
|
+
thinking?: string;
|
|
37
|
+
inherited?: boolean;
|
|
38
|
+
};
|
|
39
|
+
tools: readonly string[];
|
|
40
|
+
resources: {
|
|
41
|
+
selectors: {
|
|
42
|
+
skills: readonly string[];
|
|
43
|
+
extensions: readonly string[];
|
|
44
|
+
tools: readonly string[];
|
|
45
|
+
};
|
|
46
|
+
skills: readonly string[];
|
|
47
|
+
extensions: readonly string[];
|
|
48
|
+
tools: readonly string[];
|
|
49
|
+
unmatchedSkills: readonly string[];
|
|
50
|
+
unmatchedExtensions: readonly string[];
|
|
51
|
+
unmatchedTools: readonly string[];
|
|
52
|
+
selectorSources?: NonNullable<AgentResourcePolicy["selectorSources"]>;
|
|
53
|
+
};
|
|
54
|
+
systemPrompt: {
|
|
55
|
+
probe: string;
|
|
56
|
+
expandedProbe: string;
|
|
57
|
+
text: string;
|
|
58
|
+
source?: string;
|
|
59
|
+
};
|
|
60
|
+
setup: {
|
|
61
|
+
hooks: readonly string[];
|
|
62
|
+
diagnostics: readonly DoctorDiagnostic[];
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
export interface DoctorPiState {
|
|
66
|
+
trust: DoctorTrust;
|
|
67
|
+
model?: {
|
|
68
|
+
provider: string;
|
|
69
|
+
model: string;
|
|
70
|
+
thinking?: string;
|
|
71
|
+
};
|
|
72
|
+
activeTools: readonly string[];
|
|
73
|
+
knownModels: readonly string[];
|
|
74
|
+
availableModels: readonly string[];
|
|
75
|
+
extensionErrors: readonly {
|
|
76
|
+
path?: string;
|
|
77
|
+
message: string;
|
|
78
|
+
}[];
|
|
79
|
+
extensions?: readonly string[];
|
|
80
|
+
skills?: readonly string[];
|
|
81
|
+
functions: Readonly<Record<string, WorkflowFunction>>;
|
|
82
|
+
}
|
|
83
|
+
export interface DoctorReport {
|
|
84
|
+
cwd: string;
|
|
85
|
+
agentDir: string;
|
|
86
|
+
settingsPath: string;
|
|
87
|
+
settings: Readonly<WorkflowSettings>;
|
|
88
|
+
settingsSources: WorkflowSettingsSources;
|
|
89
|
+
trust: DoctorTrust;
|
|
90
|
+
activeTools: readonly string[];
|
|
91
|
+
piExtensions: readonly string[];
|
|
92
|
+
piSkills: readonly string[];
|
|
93
|
+
roles: readonly DoctorRole[];
|
|
94
|
+
functions: readonly DoctorFunction[];
|
|
95
|
+
resourcePolicy: AgentResourcePolicy;
|
|
96
|
+
modelAliases: readonly WorkflowCatalogModelAlias[];
|
|
97
|
+
roleTarget?: string;
|
|
98
|
+
roleInspection?: DoctorRoleInspection;
|
|
99
|
+
diagnostics: readonly DoctorDiagnostic[];
|
|
100
|
+
}
|
|
101
|
+
export interface DoctorOptions {
|
|
102
|
+
cwd?: string;
|
|
103
|
+
agentDir?: string;
|
|
104
|
+
settingsPath?: string;
|
|
105
|
+
role?: string;
|
|
106
|
+
prompt?: string;
|
|
107
|
+
discoverPi?: (cwd: string, agentDir: string) => Promise<DoctorPiState>;
|
|
108
|
+
activeTools?: readonly string[];
|
|
109
|
+
registry?: WorkflowRegistryApi;
|
|
110
|
+
}
|
|
111
|
+
export declare function doctor(options?: DoctorOptions): Promise<DoctorReport>;
|
|
112
|
+
export declare function doctorExitCode(report: DoctorReport): 0 | 1;
|
|
113
|
+
export declare function formatDoctorReport(report: DoctorReport): string;
|