@jagit/agent-reporter 0.0.1 → 0.0.3
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/git-username.js +1 -1
- package/dist/schema.d.ts +6 -0
- package/dist/schema.js +6 -0
- package/package.json +2 -2
package/dist/git-username.js
CHANGED
|
@@ -12,5 +12,5 @@ export function resolveGitUsername(cwd = process.cwd()) {
|
|
|
12
12
|
const fromEnv = process.env.JAGIT_GIT_USERNAME?.trim();
|
|
13
13
|
if (fromEnv)
|
|
14
14
|
return fromEnv;
|
|
15
|
-
return tryGit("config user.
|
|
15
|
+
return tryGit("config user.name", cwd) ?? tryGit("config user.email", cwd) ?? "unknown";
|
|
16
16
|
}
|
package/dist/schema.d.ts
CHANGED
|
@@ -12,10 +12,16 @@ export declare const AgentSessionPayloadSchema: z.ZodObject<{
|
|
|
12
12
|
model: z.ZodString;
|
|
13
13
|
inputTokens: z.ZodNumber;
|
|
14
14
|
cachedInputTokens: z.ZodNumber;
|
|
15
|
+
cacheCreationInputTokens: z.ZodOptional<z.ZodNumber>;
|
|
15
16
|
outputTokens: z.ZodNumber;
|
|
16
17
|
costUsd: z.ZodNullable<z.ZodNumber>;
|
|
17
18
|
toolCallCount: z.ZodNullable<z.ZodNumber>;
|
|
18
19
|
startedAt: z.ZodString;
|
|
19
20
|
rawPayload: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
21
|
+
jiraTicketId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
22
|
+
initialCommitSha: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
23
|
+
durationMs: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
24
|
+
linesAdded: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
25
|
+
linesRemoved: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
20
26
|
}, z.core.$strip>;
|
|
21
27
|
export type AgentSessionPayload = z.infer<typeof AgentSessionPayloadSchema>;
|
package/dist/schema.js
CHANGED
|
@@ -7,9 +7,15 @@ export const AgentSessionPayloadSchema = z.object({
|
|
|
7
7
|
model: z.string().min(1).max(200),
|
|
8
8
|
inputTokens: z.number().int().nonnegative(),
|
|
9
9
|
cachedInputTokens: z.number().int().nonnegative(),
|
|
10
|
+
cacheCreationInputTokens: z.number().int().nonnegative().optional(),
|
|
10
11
|
outputTokens: z.number().int().nonnegative(),
|
|
11
12
|
costUsd: z.number().nonnegative().nullable(),
|
|
12
13
|
toolCallCount: z.number().int().nonnegative().nullable(),
|
|
13
14
|
startedAt: z.string().datetime(),
|
|
14
15
|
rawPayload: z.record(z.string(), z.unknown()).optional(),
|
|
16
|
+
jiraTicketId: z.string().nullable().optional(),
|
|
17
|
+
initialCommitSha: z.string().nullable().optional(),
|
|
18
|
+
durationMs: z.number().int().nonnegative().nullable().optional(),
|
|
19
|
+
linesAdded: z.number().int().nonnegative().nullable().optional(),
|
|
20
|
+
linesRemoved: z.number().int().nonnegative().nullable().optional(),
|
|
15
21
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jagit/agent-reporter",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
],
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"zod": "^4.4.3",
|
|
12
|
-
"@jagit/shared": "0.0.
|
|
12
|
+
"@jagit/shared": "0.0.3"
|
|
13
13
|
},
|
|
14
14
|
"devDependencies": {
|
|
15
15
|
"@types/node": "^25.9.3",
|