agent-afk 5.296.1 → 5.296.2
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/cli.mjs +328 -328
- package/dist/index.mjs +141 -141
- package/dist/skills/audit-fit/handler.d.ts +4 -0
- package/dist/skills/audit-fit/index.d.ts +3 -98
- package/dist/skills/audit-fit/schemas.d.ts +98 -0
- package/dist/telegram.mjs +164 -164
- package/package.json +1 -1
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { SkillExecutionContext } from '../index.js';
|
|
2
|
+
import type { IAgentSession } from '../../agent/types.js';
|
|
3
|
+
import { type AuditFitResult } from './schemas.js';
|
|
4
|
+
export declare function handler(input: unknown, parentSession?: IAgentSession, ctx?: SkillExecutionContext): Promise<AuditFitResult>;
|
|
@@ -1,100 +1,5 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
1
|
import { type SkillMetadata } from '../index.js';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export
|
|
6
|
-
path: z.ZodString;
|
|
7
|
-
type: z.ZodEnum<{
|
|
8
|
-
agent: "agent";
|
|
9
|
-
command: "command";
|
|
10
|
-
skill: "skill";
|
|
11
|
-
hook: "hook";
|
|
12
|
-
}>;
|
|
13
|
-
source: z.ZodEnum<{
|
|
14
|
-
user: "user";
|
|
15
|
-
plugin: "plugin";
|
|
16
|
-
}>;
|
|
17
|
-
plugin_key: z.ZodOptional<z.ZodString>;
|
|
18
|
-
verdict: z.ZodEnum<{
|
|
19
|
-
correct: "correct";
|
|
20
|
-
misfit: "misfit";
|
|
21
|
-
outlier: "outlier";
|
|
22
|
-
}>;
|
|
23
|
-
recommended_type: z.ZodString;
|
|
24
|
-
rationale: z.ZodString;
|
|
25
|
-
confidence: z.ZodEnum<{
|
|
26
|
-
low: "low";
|
|
27
|
-
high: "high";
|
|
28
|
-
med: "med";
|
|
29
|
-
}>;
|
|
30
|
-
}, z.core.$strip>;
|
|
31
|
-
export type Verdict = z.infer<typeof VerdictSchema>;
|
|
32
|
-
export declare const InventoryMatrixSchema: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
33
|
-
export type InventoryMatrix = z.infer<typeof InventoryMatrixSchema>;
|
|
34
|
-
export declare const AuditFitResultSchema: z.ZodObject<{
|
|
35
|
-
inventory: z.ZodObject<{
|
|
36
|
-
user: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
37
|
-
plugin: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
38
|
-
}, z.core.$strip>;
|
|
39
|
-
misfits: z.ZodArray<z.ZodObject<{
|
|
40
|
-
path: z.ZodString;
|
|
41
|
-
type: z.ZodEnum<{
|
|
42
|
-
agent: "agent";
|
|
43
|
-
command: "command";
|
|
44
|
-
skill: "skill";
|
|
45
|
-
hook: "hook";
|
|
46
|
-
}>;
|
|
47
|
-
source: z.ZodEnum<{
|
|
48
|
-
user: "user";
|
|
49
|
-
plugin: "plugin";
|
|
50
|
-
}>;
|
|
51
|
-
plugin_key: z.ZodOptional<z.ZodString>;
|
|
52
|
-
verdict: z.ZodEnum<{
|
|
53
|
-
correct: "correct";
|
|
54
|
-
misfit: "misfit";
|
|
55
|
-
outlier: "outlier";
|
|
56
|
-
}>;
|
|
57
|
-
recommended_type: z.ZodString;
|
|
58
|
-
rationale: z.ZodString;
|
|
59
|
-
confidence: z.ZodEnum<{
|
|
60
|
-
low: "low";
|
|
61
|
-
high: "high";
|
|
62
|
-
med: "med";
|
|
63
|
-
}>;
|
|
64
|
-
}, z.core.$strip>>;
|
|
65
|
-
briefs_written: z.ZodNumber;
|
|
66
|
-
total_artifacts: z.ZodNumber;
|
|
67
|
-
}, z.core.$strip>;
|
|
68
|
-
export type AuditFitResult = z.infer<typeof AuditFitResultSchema>;
|
|
69
|
-
export declare const AuditFitInputSchema: z.ZodObject<{
|
|
70
|
-
writeBriefs: z.ZodOptional<z.ZodBoolean>;
|
|
71
|
-
scope: z.ZodOptional<z.ZodEnum<{
|
|
72
|
-
user: "user";
|
|
73
|
-
plugin: "plugin";
|
|
74
|
-
all: "all";
|
|
75
|
-
}>>;
|
|
76
|
-
}, z.core.$strip>;
|
|
77
|
-
export type AuditFitInput = z.infer<typeof AuditFitInputSchema>;
|
|
78
|
-
type Scope = 'user' | 'plugin' | 'all';
|
|
79
|
-
type FullArtifactType = 'skill' | 'command' | 'agent' | 'hook';
|
|
80
|
-
export declare function planAuditScope(scope: Scope): {
|
|
81
|
-
runUserDiscovery: boolean;
|
|
82
|
-
runPluginDiscovery: boolean;
|
|
83
|
-
runHookInspector: boolean;
|
|
84
|
-
};
|
|
85
|
-
export declare function aggregateVerdicts(verdicts: ReadonlyArray<Verdict>): {
|
|
86
|
-
inventory: AuditFitResult['inventory'];
|
|
87
|
-
misfits: Verdict[];
|
|
88
|
-
};
|
|
89
|
-
export declare function shouldWriteBriefForMisfit(m: Verdict): boolean;
|
|
90
|
-
export declare function renderHookList(settingsPath: string, hooks: ReadonlyArray<DiscoveredHook>): string;
|
|
91
|
-
export type InspectorOutcome = {
|
|
92
|
-
kind: 'failure';
|
|
93
|
-
message: string;
|
|
94
|
-
} | {
|
|
95
|
-
kind: 'success';
|
|
96
|
-
output: ReadonlyArray<Verdict>;
|
|
97
|
-
};
|
|
98
|
-
export declare function classifyInspectorResult(type: FullArtifactType, result: SubagentResult<ReadonlyArray<Verdict>> | undefined): InspectorOutcome;
|
|
2
|
+
export { VerdictSchema, InventoryMatrixSchema, AuditFitResultSchema, AuditFitInputSchema, planAuditScope, aggregateVerdicts, shouldWriteBriefForMisfit, renderHookList, classifyInspectorResult, ALL_TYPES, } from './schemas.js';
|
|
3
|
+
export type { Verdict, InventoryMatrix, AuditFitResult, AuditFitInput, Scope, FullArtifactType, InspectorOutcome, } from './schemas.js';
|
|
4
|
+
export type { SkillExecutionContext } from '../index.js';
|
|
99
5
|
export declare const auditFitSkill: SkillMetadata;
|
|
100
|
-
export {};
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import type { SubagentResult } from '../../agent/subagent/result.js';
|
|
3
|
+
import type { DiscoveredHook } from './discover.js';
|
|
4
|
+
export declare const VerdictSchema: z.ZodObject<{
|
|
5
|
+
path: z.ZodString;
|
|
6
|
+
type: z.ZodEnum<{
|
|
7
|
+
agent: "agent";
|
|
8
|
+
command: "command";
|
|
9
|
+
skill: "skill";
|
|
10
|
+
hook: "hook";
|
|
11
|
+
}>;
|
|
12
|
+
source: z.ZodEnum<{
|
|
13
|
+
user: "user";
|
|
14
|
+
plugin: "plugin";
|
|
15
|
+
}>;
|
|
16
|
+
plugin_key: z.ZodOptional<z.ZodString>;
|
|
17
|
+
verdict: z.ZodEnum<{
|
|
18
|
+
correct: "correct";
|
|
19
|
+
misfit: "misfit";
|
|
20
|
+
outlier: "outlier";
|
|
21
|
+
}>;
|
|
22
|
+
recommended_type: z.ZodString;
|
|
23
|
+
rationale: z.ZodString;
|
|
24
|
+
confidence: z.ZodEnum<{
|
|
25
|
+
low: "low";
|
|
26
|
+
high: "high";
|
|
27
|
+
med: "med";
|
|
28
|
+
}>;
|
|
29
|
+
}, z.core.$strip>;
|
|
30
|
+
export type Verdict = z.infer<typeof VerdictSchema>;
|
|
31
|
+
export declare const InventoryMatrixSchema: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
32
|
+
export type InventoryMatrix = z.infer<typeof InventoryMatrixSchema>;
|
|
33
|
+
export declare const AuditFitResultSchema: z.ZodObject<{
|
|
34
|
+
inventory: z.ZodObject<{
|
|
35
|
+
user: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
36
|
+
plugin: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
37
|
+
}, z.core.$strip>;
|
|
38
|
+
misfits: z.ZodArray<z.ZodObject<{
|
|
39
|
+
path: z.ZodString;
|
|
40
|
+
type: z.ZodEnum<{
|
|
41
|
+
agent: "agent";
|
|
42
|
+
command: "command";
|
|
43
|
+
skill: "skill";
|
|
44
|
+
hook: "hook";
|
|
45
|
+
}>;
|
|
46
|
+
source: z.ZodEnum<{
|
|
47
|
+
user: "user";
|
|
48
|
+
plugin: "plugin";
|
|
49
|
+
}>;
|
|
50
|
+
plugin_key: z.ZodOptional<z.ZodString>;
|
|
51
|
+
verdict: z.ZodEnum<{
|
|
52
|
+
correct: "correct";
|
|
53
|
+
misfit: "misfit";
|
|
54
|
+
outlier: "outlier";
|
|
55
|
+
}>;
|
|
56
|
+
recommended_type: z.ZodString;
|
|
57
|
+
rationale: z.ZodString;
|
|
58
|
+
confidence: z.ZodEnum<{
|
|
59
|
+
low: "low";
|
|
60
|
+
high: "high";
|
|
61
|
+
med: "med";
|
|
62
|
+
}>;
|
|
63
|
+
}, z.core.$strip>>;
|
|
64
|
+
briefs_written: z.ZodNumber;
|
|
65
|
+
total_artifacts: z.ZodNumber;
|
|
66
|
+
}, z.core.$strip>;
|
|
67
|
+
export type AuditFitResult = z.infer<typeof AuditFitResultSchema>;
|
|
68
|
+
export declare const AuditFitInputSchema: z.ZodObject<{
|
|
69
|
+
writeBriefs: z.ZodOptional<z.ZodBoolean>;
|
|
70
|
+
scope: z.ZodOptional<z.ZodEnum<{
|
|
71
|
+
user: "user";
|
|
72
|
+
plugin: "plugin";
|
|
73
|
+
all: "all";
|
|
74
|
+
}>>;
|
|
75
|
+
}, z.core.$strip>;
|
|
76
|
+
export type AuditFitInput = z.infer<typeof AuditFitInputSchema>;
|
|
77
|
+
export type Scope = 'user' | 'plugin' | 'all';
|
|
78
|
+
export type FullArtifactType = 'skill' | 'command' | 'agent' | 'hook';
|
|
79
|
+
export declare const ALL_TYPES: ReadonlyArray<FullArtifactType>;
|
|
80
|
+
export declare function planAuditScope(scope: Scope): {
|
|
81
|
+
runUserDiscovery: boolean;
|
|
82
|
+
runPluginDiscovery: boolean;
|
|
83
|
+
runHookInspector: boolean;
|
|
84
|
+
};
|
|
85
|
+
export declare function aggregateVerdicts(verdicts: ReadonlyArray<Verdict>): {
|
|
86
|
+
inventory: AuditFitResult['inventory'];
|
|
87
|
+
misfits: Verdict[];
|
|
88
|
+
};
|
|
89
|
+
export declare function shouldWriteBriefForMisfit(m: Verdict): boolean;
|
|
90
|
+
export declare function renderHookList(settingsPath: string, hooks: ReadonlyArray<DiscoveredHook>): string;
|
|
91
|
+
export type InspectorOutcome = {
|
|
92
|
+
kind: 'failure';
|
|
93
|
+
message: string;
|
|
94
|
+
} | {
|
|
95
|
+
kind: 'success';
|
|
96
|
+
output: ReadonlyArray<Verdict>;
|
|
97
|
+
};
|
|
98
|
+
export declare function classifyInspectorResult(type: FullArtifactType, result: SubagentResult<ReadonlyArray<Verdict>> | undefined): InspectorOutcome;
|