@sentry/junior 0.96.0 → 0.97.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/{agent-hooks-5URSMY3O.js → agent-hooks-XSUIVRQS.js} +8 -6
- package/dist/{reporting → api}/conversations/activity.d.ts +1 -1
- package/dist/api/conversations/detail-projection.d.ts +10 -0
- package/dist/api/conversations/detail.d.ts +3 -0
- package/dist/api/conversations/detail.query.d.ts +3 -0
- package/dist/api/conversations/list.d.ts +3 -0
- package/dist/api/conversations/list.query.d.ts +94 -0
- package/dist/api/conversations/projection.d.ts +14 -0
- package/dist/api/conversations/schema.d.ts +683 -0
- package/dist/{reporting → api}/conversations/shared.d.ts +1 -5
- package/dist/api/conversations/stats.d.ts +3 -0
- package/dist/api/conversations/stats.query.d.ts +3 -0
- package/dist/api/conversations/subagent.d.ts +3 -0
- package/dist/{reporting → api}/conversations/transcript.d.ts +4 -4
- package/dist/api/people/list.d.ts +1 -2
- package/dist/api/people/list.query.d.ts +3 -4
- package/dist/api/people/profile.d.ts +1 -2
- package/dist/api/people/profile.query.d.ts +3 -4
- package/dist/api/people/schema.d.ts +193 -0
- package/dist/api/people/shared.d.ts +31 -9
- package/dist/api/schema.d.ts +20 -0
- package/dist/api/schema.js +50 -0
- package/dist/api-reference.d.ts +4 -3
- package/dist/api.d.ts +3 -0
- package/dist/api.js +156 -0
- package/dist/app.d.ts +1 -4
- package/dist/app.js +101 -367
- package/dist/build/virtual-config.d.ts +2 -2
- package/dist/{catalog-runtime-MSMAYYIK.js → catalog-runtime-PFHVMHDR.js} +3 -2
- package/dist/chat/agent/resume.d.ts +3 -1
- package/dist/chat/agent/tools.d.ts +2 -1
- package/dist/chat/config.d.ts +1 -8
- package/dist/chat/conversations/history.d.ts +241 -27
- package/dist/chat/conversations/legacy-advisor-session.d.ts +7 -0
- package/dist/chat/conversations/legacy-import.d.ts +2 -2
- package/dist/chat/conversations/projection.d.ts +19 -3
- package/dist/chat/conversations/sql/legacy-history-import.d.ts +1 -1
- package/dist/chat/conversations/sql/store.d.ts +15 -9
- package/dist/chat/conversations/store.d.ts +9 -4
- package/dist/chat/model-profile.d.ts +14 -0
- package/dist/chat/pi/transcript.d.ts +5 -3
- package/dist/chat/resource-events/store.d.ts +2 -2
- package/dist/chat/services/context-compaction.d.ts +15 -0
- package/dist/chat/services/turn-result.d.ts +1 -0
- package/dist/chat/services/turn-session-record.d.ts +6 -6
- package/dist/chat/state/turn-session.d.ts +16 -5
- package/dist/chat/task-execution/store.d.ts +2 -2
- package/dist/chat/tools/handoff/tool.d.ts +45 -0
- package/dist/chat/tools/types.d.ts +7 -2
- package/dist/chat/usage.d.ts +25 -25
- package/dist/{chunk-RITD7E5L.js → chunk-35BNLDOJ.js} +338 -577
- package/dist/{chunk-PMNN6ST4.js → chunk-3ECW2K2O.js} +7 -2
- package/dist/{chunk-5C6XTTFI.js → chunk-3F4OPKGF.js} +89 -55
- package/dist/chunk-3V7OFJZC.js +264 -0
- package/dist/chunk-4ZNGQH7C.js +25 -0
- package/dist/{chunk-S5KZ5LPG.js → chunk-5HLDPVYS.js} +14 -447
- package/dist/{chunk-DZENG5ML.js → chunk-6U26PYI5.js} +24 -14
- package/dist/chunk-AUUCAFDE.js +546 -0
- package/dist/{chunk-6APU57E6.js → chunk-B3IT5END.js} +41 -260
- package/dist/chunk-CEA3A3UA.js +86 -0
- package/dist/{chunk-YDT7SNCN.js → chunk-D5KZYS4T.js} +1 -1
- package/dist/{chunk-YDVEH3SB.js → chunk-EEZCY5WX.js} +78 -28
- package/dist/{chunk-2NAZZPPS.js → chunk-EOWXRY5E.js} +1 -1
- package/dist/{chunk-GQ3GK22G.js → chunk-FBHZJFHI.js} +2 -2
- package/dist/{chunk-CZEX6KIQ.js → chunk-G3E7SCME.js} +0 -23
- package/dist/chunk-GUAP3H7O.js +319 -0
- package/dist/{chunk-BYZWPRJA.js → chunk-H66UCBPW.js} +6 -4
- package/dist/{chunk-L7CDEIVJ.js → chunk-LMJPRYHP.js} +4 -2
- package/dist/chunk-LUAE4MGW.js +199 -0
- package/dist/{chunk-GY34VGP5.js → chunk-LVA4I4H7.js} +3 -1
- package/dist/chunk-LVUKF5CE.js +63 -0
- package/dist/{chunk-AAZXTVJT.js → chunk-NG2AV7IB.js} +2 -72
- package/dist/chunk-ON6YKIQ7.js +260 -0
- package/dist/chunk-PDO5BLNM.js +22 -0
- package/dist/chunk-QNVHH5PU.js +20 -0
- package/dist/{chunk-P3YFQLEN.js → chunk-T533JLM3.js} +8 -10
- package/dist/chunk-UAMKJPDF.js +11 -0
- package/dist/chunk-VFH4ZKZT.js +66 -0
- package/dist/{chunk-UKHVMPX5.js → chunk-WGXMTFNU.js} +15 -17
- package/dist/{chunk-MNTINMWR.js → chunk-WJOSZOON.js} +184 -300
- package/dist/chunk-WTYEKPXU.js +451 -0
- package/dist/{chunk-IYM2SIVG.js → chunk-XIRPQQVE.js} +605 -363
- package/dist/cli/chat.js +24 -21
- package/dist/cli/check.js +4 -3
- package/dist/cli/init.js +12 -0
- package/dist/cli/plugins.js +12 -9
- package/dist/cli/snapshot-warmup.js +8 -6
- package/dist/cli/upgrade.js +265 -137
- package/dist/db/db.d.ts +4 -0
- package/dist/db/schema/conversations.d.ts +128 -0
- package/dist/db/schema.d.ts +129 -60
- package/dist/{db-2D6RMG67.js → db-BWXYIKFQ.js} +3 -3
- package/dist/detail-GA6NXWQJ.js +43 -0
- package/dist/discovery-RMHYSRL7.js +43 -0
- package/dist/handlers/health.d.ts +3 -0
- package/dist/instrumentation.js +1 -1
- package/dist/{legacy-import-VZ2MEGP7.js → legacy-import-3NQJVGQL.js} +4 -4
- package/dist/{api/people/list.js → list-A3WFRIYX.js} +26 -16
- package/dist/list-UXJI5Q5X.js +27 -0
- package/dist/nitro.d.ts +1 -1
- package/dist/nitro.js +2 -1
- package/dist/plugin-conversations-DDNGC35A.js +36 -0
- package/dist/{api/people/profile.js → profile-4RYDXWTF.js} +33 -18
- package/dist/reporting/plugin-conversations.d.ts +3 -0
- package/dist/reporting-schema.d.ts +140 -0
- package/dist/reporting.d.ts +12 -81
- package/dist/{runner-JZBRQP4F.js → runner-JALSYH2P.js} +17 -12
- package/dist/skills-MAZXZ2KE.js +26 -0
- package/dist/stats-XKXH3PTY.js +217 -0
- package/dist/subagent-TZ55XY37.js +48 -0
- package/dist/usage-schema.d.ts +25 -0
- package/dist/{validation-6XOOQGME.js → validation-FMEAEKCY.js} +4 -3
- package/migrations/0000_initial.sql +115 -0
- package/migrations/0001_conversation_metrics.sql +4 -0
- package/migrations/README.md +12 -30
- package/migrations/meta/0000_snapshot.json +1 -33
- package/migrations/meta/0001_snapshot.json +972 -0
- package/migrations/meta/_journal.json +9 -2
- package/package.json +13 -17
- package/dist/api/people/types.d.ts +0 -85
- package/dist/chat/advisor-request.d.ts +0 -4
- package/dist/chat/conversations/sql/migrations.d.ts +0 -22
- package/dist/chat/tools/advisor/session-store.d.ts +0 -9
- package/dist/chat/tools/advisor/tool.d.ts +0 -72
- package/dist/chunk-RAIB6WSG.js +0 -142
- package/dist/chunk-WM6KHPBQ.js +0 -48
- package/dist/db/schema/migrations.d.ts +0 -58
- package/dist/reporting/conversations/context.d.ts +0 -8
- package/dist/reporting/conversations/details.d.ts +0 -6
- package/dist/reporting/conversations/index.d.ts +0 -4
- package/dist/reporting/conversations/statistics.d.ts +0 -4
- package/dist/reporting/conversations/summaries.d.ts +0 -20
- package/dist/reporting/conversations/types.d.ts +0 -191
- package/dist/reporting/conversations.d.ts +0 -1
- package/dist/reporting.js +0 -1155
package/dist/db/schema.d.ts
CHANGED
|
@@ -3,9 +3,8 @@ import { juniorConversationMessages } from "./schema/conversation-messages";
|
|
|
3
3
|
import { juniorConversations } from "./schema/conversations";
|
|
4
4
|
import { juniorDestinations } from "./schema/destinations";
|
|
5
5
|
import { juniorIdentities } from "./schema/identities";
|
|
6
|
-
import { juniorSchemaMigrations } from "./schema/migrations";
|
|
7
6
|
import { juniorUsers } from "./schema/users";
|
|
8
|
-
export { juniorAgentSteps, juniorConversationMessages, juniorConversations, juniorDestinations, juniorIdentities,
|
|
7
|
+
export { juniorAgentSteps, juniorConversationMessages, juniorConversations, juniorDestinations, juniorIdentities, juniorUsers, };
|
|
9
8
|
export declare const juniorSqlSchema: {
|
|
10
9
|
juniorAgentSteps: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
11
10
|
name: "junior_agent_steps";
|
|
@@ -730,6 +729,134 @@ export declare const juniorSqlSchema: {
|
|
|
730
729
|
identity: undefined;
|
|
731
730
|
generated: undefined;
|
|
732
731
|
}, {}, {}>;
|
|
732
|
+
durationMs: import("drizzle-orm/pg-core").PgColumn<{
|
|
733
|
+
name: "duration_ms";
|
|
734
|
+
tableName: "junior_conversations";
|
|
735
|
+
dataType: "number";
|
|
736
|
+
columnType: "PgInteger";
|
|
737
|
+
data: number;
|
|
738
|
+
driverParam: string | number;
|
|
739
|
+
notNull: true;
|
|
740
|
+
hasDefault: true;
|
|
741
|
+
isPrimaryKey: false;
|
|
742
|
+
isAutoincrement: false;
|
|
743
|
+
hasRuntimeDefault: false;
|
|
744
|
+
enumValues: undefined;
|
|
745
|
+
baseColumn: never;
|
|
746
|
+
identity: undefined;
|
|
747
|
+
generated: undefined;
|
|
748
|
+
}, {}, {}>;
|
|
749
|
+
usage: import("drizzle-orm/pg-core").PgColumn<{
|
|
750
|
+
name: "usage_json";
|
|
751
|
+
tableName: "junior_conversations";
|
|
752
|
+
dataType: "json";
|
|
753
|
+
columnType: "PgJsonb";
|
|
754
|
+
data: {
|
|
755
|
+
inputTokens?: number | undefined;
|
|
756
|
+
outputTokens?: number | undefined;
|
|
757
|
+
cachedInputTokens?: number | undefined;
|
|
758
|
+
cacheCreationTokens?: number | undefined;
|
|
759
|
+
reasoningTokens?: number | undefined;
|
|
760
|
+
totalTokens?: number | undefined;
|
|
761
|
+
cost?: {
|
|
762
|
+
input?: number | undefined;
|
|
763
|
+
output?: number | undefined;
|
|
764
|
+
cacheRead?: number | undefined;
|
|
765
|
+
cacheWrite?: number | undefined;
|
|
766
|
+
total?: number | undefined;
|
|
767
|
+
} | undefined;
|
|
768
|
+
};
|
|
769
|
+
driverParam: unknown;
|
|
770
|
+
notNull: false;
|
|
771
|
+
hasDefault: false;
|
|
772
|
+
isPrimaryKey: false;
|
|
773
|
+
isAutoincrement: false;
|
|
774
|
+
hasRuntimeDefault: false;
|
|
775
|
+
enumValues: undefined;
|
|
776
|
+
baseColumn: never;
|
|
777
|
+
identity: undefined;
|
|
778
|
+
generated: undefined;
|
|
779
|
+
}, {}, {
|
|
780
|
+
$type: {
|
|
781
|
+
inputTokens?: number | undefined;
|
|
782
|
+
outputTokens?: number | undefined;
|
|
783
|
+
cachedInputTokens?: number | undefined;
|
|
784
|
+
cacheCreationTokens?: number | undefined;
|
|
785
|
+
reasoningTokens?: number | undefined;
|
|
786
|
+
totalTokens?: number | undefined;
|
|
787
|
+
cost?: {
|
|
788
|
+
input?: number | undefined;
|
|
789
|
+
output?: number | undefined;
|
|
790
|
+
cacheRead?: number | undefined;
|
|
791
|
+
cacheWrite?: number | undefined;
|
|
792
|
+
total?: number | undefined;
|
|
793
|
+
} | undefined;
|
|
794
|
+
};
|
|
795
|
+
}>;
|
|
796
|
+
executionDurationMs: import("drizzle-orm/pg-core").PgColumn<{
|
|
797
|
+
name: "execution_duration_ms";
|
|
798
|
+
tableName: "junior_conversations";
|
|
799
|
+
dataType: "number";
|
|
800
|
+
columnType: "PgInteger";
|
|
801
|
+
data: number;
|
|
802
|
+
driverParam: string | number;
|
|
803
|
+
notNull: true;
|
|
804
|
+
hasDefault: true;
|
|
805
|
+
isPrimaryKey: false;
|
|
806
|
+
isAutoincrement: false;
|
|
807
|
+
hasRuntimeDefault: false;
|
|
808
|
+
enumValues: undefined;
|
|
809
|
+
baseColumn: never;
|
|
810
|
+
identity: undefined;
|
|
811
|
+
generated: undefined;
|
|
812
|
+
}, {}, {}>;
|
|
813
|
+
executionUsage: import("drizzle-orm/pg-core").PgColumn<{
|
|
814
|
+
name: "execution_usage_json";
|
|
815
|
+
tableName: "junior_conversations";
|
|
816
|
+
dataType: "json";
|
|
817
|
+
columnType: "PgJsonb";
|
|
818
|
+
data: {
|
|
819
|
+
inputTokens?: number | undefined;
|
|
820
|
+
outputTokens?: number | undefined;
|
|
821
|
+
cachedInputTokens?: number | undefined;
|
|
822
|
+
cacheCreationTokens?: number | undefined;
|
|
823
|
+
reasoningTokens?: number | undefined;
|
|
824
|
+
totalTokens?: number | undefined;
|
|
825
|
+
cost?: {
|
|
826
|
+
input?: number | undefined;
|
|
827
|
+
output?: number | undefined;
|
|
828
|
+
cacheRead?: number | undefined;
|
|
829
|
+
cacheWrite?: number | undefined;
|
|
830
|
+
total?: number | undefined;
|
|
831
|
+
} | undefined;
|
|
832
|
+
};
|
|
833
|
+
driverParam: unknown;
|
|
834
|
+
notNull: false;
|
|
835
|
+
hasDefault: false;
|
|
836
|
+
isPrimaryKey: false;
|
|
837
|
+
isAutoincrement: false;
|
|
838
|
+
hasRuntimeDefault: false;
|
|
839
|
+
enumValues: undefined;
|
|
840
|
+
baseColumn: never;
|
|
841
|
+
identity: undefined;
|
|
842
|
+
generated: undefined;
|
|
843
|
+
}, {}, {
|
|
844
|
+
$type: {
|
|
845
|
+
inputTokens?: number | undefined;
|
|
846
|
+
outputTokens?: number | undefined;
|
|
847
|
+
cachedInputTokens?: number | undefined;
|
|
848
|
+
cacheCreationTokens?: number | undefined;
|
|
849
|
+
reasoningTokens?: number | undefined;
|
|
850
|
+
totalTokens?: number | undefined;
|
|
851
|
+
cost?: {
|
|
852
|
+
input?: number | undefined;
|
|
853
|
+
output?: number | undefined;
|
|
854
|
+
cacheRead?: number | undefined;
|
|
855
|
+
cacheWrite?: number | undefined;
|
|
856
|
+
total?: number | undefined;
|
|
857
|
+
} | undefined;
|
|
858
|
+
};
|
|
859
|
+
}>;
|
|
733
860
|
};
|
|
734
861
|
dialect: "pg";
|
|
735
862
|
}>;
|
|
@@ -1195,64 +1322,6 @@ export declare const juniorSqlSchema: {
|
|
|
1195
1322
|
};
|
|
1196
1323
|
dialect: "pg";
|
|
1197
1324
|
}>;
|
|
1198
|
-
juniorSchemaMigrations: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
1199
|
-
name: "junior_schema_migrations";
|
|
1200
|
-
schema: undefined;
|
|
1201
|
-
columns: {
|
|
1202
|
-
id: import("drizzle-orm/pg-core").PgColumn<{
|
|
1203
|
-
name: "id";
|
|
1204
|
-
tableName: "junior_schema_migrations";
|
|
1205
|
-
dataType: "string";
|
|
1206
|
-
columnType: "PgText";
|
|
1207
|
-
data: string;
|
|
1208
|
-
driverParam: string;
|
|
1209
|
-
notNull: true;
|
|
1210
|
-
hasDefault: false;
|
|
1211
|
-
isPrimaryKey: true;
|
|
1212
|
-
isAutoincrement: false;
|
|
1213
|
-
hasRuntimeDefault: false;
|
|
1214
|
-
enumValues: [string, ...string[]];
|
|
1215
|
-
baseColumn: never;
|
|
1216
|
-
identity: undefined;
|
|
1217
|
-
generated: undefined;
|
|
1218
|
-
}, {}, {}>;
|
|
1219
|
-
checksum: import("drizzle-orm/pg-core").PgColumn<{
|
|
1220
|
-
name: "checksum";
|
|
1221
|
-
tableName: "junior_schema_migrations";
|
|
1222
|
-
dataType: "string";
|
|
1223
|
-
columnType: "PgText";
|
|
1224
|
-
data: string;
|
|
1225
|
-
driverParam: string;
|
|
1226
|
-
notNull: true;
|
|
1227
|
-
hasDefault: false;
|
|
1228
|
-
isPrimaryKey: false;
|
|
1229
|
-
isAutoincrement: false;
|
|
1230
|
-
hasRuntimeDefault: false;
|
|
1231
|
-
enumValues: [string, ...string[]];
|
|
1232
|
-
baseColumn: never;
|
|
1233
|
-
identity: undefined;
|
|
1234
|
-
generated: undefined;
|
|
1235
|
-
}, {}, {}>;
|
|
1236
|
-
appliedAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
1237
|
-
name: string;
|
|
1238
|
-
tableName: "junior_schema_migrations";
|
|
1239
|
-
dataType: "date";
|
|
1240
|
-
columnType: "PgTimestamp";
|
|
1241
|
-
data: Date;
|
|
1242
|
-
driverParam: string;
|
|
1243
|
-
notNull: true;
|
|
1244
|
-
hasDefault: true;
|
|
1245
|
-
isPrimaryKey: false;
|
|
1246
|
-
isAutoincrement: false;
|
|
1247
|
-
hasRuntimeDefault: false;
|
|
1248
|
-
enumValues: undefined;
|
|
1249
|
-
baseColumn: never;
|
|
1250
|
-
identity: undefined;
|
|
1251
|
-
generated: undefined;
|
|
1252
|
-
}, {}, {}>;
|
|
1253
|
-
};
|
|
1254
|
-
dialect: "pg";
|
|
1255
|
-
}>;
|
|
1256
1325
|
juniorUsers: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
1257
1326
|
name: "junior_users";
|
|
1258
1327
|
schema: undefined;
|
|
@@ -5,9 +5,9 @@ import {
|
|
|
5
5
|
getConversationStore,
|
|
6
6
|
getDb,
|
|
7
7
|
getSqlExecutor
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-35BNLDOJ.js";
|
|
9
|
+
import "./chunk-EEZCY5WX.js";
|
|
10
|
+
import "./chunk-LVA4I4H7.js";
|
|
11
11
|
import "./chunk-B7PUBQQM.js";
|
|
12
12
|
import "./chunk-I35CTGPO.js";
|
|
13
13
|
import "./chunk-OB42YVAE.js";
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import {
|
|
2
|
+
buildConversationDetail
|
|
3
|
+
} from "./chunk-AUUCAFDE.js";
|
|
4
|
+
import {
|
|
5
|
+
readConversationRecordFromSql
|
|
6
|
+
} from "./chunk-ON6YKIQ7.js";
|
|
7
|
+
import {
|
|
8
|
+
conversationDetailReportSchema
|
|
9
|
+
} from "./chunk-LUAE4MGW.js";
|
|
10
|
+
import "./chunk-LVUKF5CE.js";
|
|
11
|
+
import "./chunk-NG2AV7IB.js";
|
|
12
|
+
import "./chunk-GUAP3H7O.js";
|
|
13
|
+
import "./chunk-3F4OPKGF.js";
|
|
14
|
+
import "./chunk-PDO5BLNM.js";
|
|
15
|
+
import "./chunk-WTYEKPXU.js";
|
|
16
|
+
import "./chunk-35BNLDOJ.js";
|
|
17
|
+
import "./chunk-4ZNGQH7C.js";
|
|
18
|
+
import "./chunk-EEZCY5WX.js";
|
|
19
|
+
import "./chunk-LVA4I4H7.js";
|
|
20
|
+
import "./chunk-B7PUBQQM.js";
|
|
21
|
+
import "./chunk-I35CTGPO.js";
|
|
22
|
+
import "./chunk-OB42YVAE.js";
|
|
23
|
+
import "./chunk-6GWA276C.js";
|
|
24
|
+
import "./chunk-7FBGKXPE.js";
|
|
25
|
+
import "./chunk-MLKGABMK.js";
|
|
26
|
+
|
|
27
|
+
// src/api/conversations/detail.query.ts
|
|
28
|
+
async function readConversationDetailFromSql(conversationId) {
|
|
29
|
+
const record = await readConversationRecordFromSql(conversationId);
|
|
30
|
+
return record ? buildConversationDetail({
|
|
31
|
+
...record,
|
|
32
|
+
usage: record.usage ?? void 0
|
|
33
|
+
}) : void 0;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// src/api/conversations/detail.ts
|
|
37
|
+
async function readConversationDetail(conversationId) {
|
|
38
|
+
const report = await readConversationDetailFromSql(conversationId);
|
|
39
|
+
return report ? conversationDetailReportSchema.parse(report) : void 0;
|
|
40
|
+
}
|
|
41
|
+
export {
|
|
42
|
+
readConversationDetail
|
|
43
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import {
|
|
2
|
+
dataDir,
|
|
3
|
+
dataRoots,
|
|
4
|
+
descriptionPath,
|
|
5
|
+
descriptionPathCandidates,
|
|
6
|
+
discoverNodeModulesDirs,
|
|
7
|
+
discoverProjectRoots,
|
|
8
|
+
homeDir,
|
|
9
|
+
isDirectory,
|
|
10
|
+
isFile,
|
|
11
|
+
listReferenceFiles,
|
|
12
|
+
pluginRoots,
|
|
13
|
+
pluginsDir,
|
|
14
|
+
resolveHomeDir,
|
|
15
|
+
skillRoots,
|
|
16
|
+
skillsDir,
|
|
17
|
+
soulPath,
|
|
18
|
+
soulPathCandidates,
|
|
19
|
+
worldPath,
|
|
20
|
+
worldPathCandidates
|
|
21
|
+
} from "./chunk-3V7OFJZC.js";
|
|
22
|
+
import "./chunk-MLKGABMK.js";
|
|
23
|
+
export {
|
|
24
|
+
dataDir,
|
|
25
|
+
dataRoots,
|
|
26
|
+
descriptionPath,
|
|
27
|
+
descriptionPathCandidates,
|
|
28
|
+
discoverNodeModulesDirs,
|
|
29
|
+
discoverProjectRoots,
|
|
30
|
+
homeDir,
|
|
31
|
+
isDirectory,
|
|
32
|
+
isFile,
|
|
33
|
+
listReferenceFiles,
|
|
34
|
+
pluginRoots,
|
|
35
|
+
pluginsDir,
|
|
36
|
+
resolveHomeDir,
|
|
37
|
+
skillRoots,
|
|
38
|
+
skillsDir,
|
|
39
|
+
soulPath,
|
|
40
|
+
soulPathCandidates,
|
|
41
|
+
worldPath,
|
|
42
|
+
worldPathCandidates
|
|
43
|
+
};
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import type { HealthReport } from "@/reporting-schema";
|
|
2
|
+
/** Build Junior's process health value for HTTP and reporting consumers. */
|
|
3
|
+
export declare function readHealthReport(): HealthReport;
|
|
1
4
|
/**
|
|
2
5
|
* Returns a minimal JSON health response for runtime health checks.
|
|
3
6
|
*/
|
package/dist/instrumentation.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ensureLegacyConversationImport,
|
|
3
3
|
importConversationFromLegacy
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-3F4OPKGF.js";
|
|
5
|
+
import "./chunk-35BNLDOJ.js";
|
|
6
|
+
import "./chunk-EEZCY5WX.js";
|
|
7
|
+
import "./chunk-LVA4I4H7.js";
|
|
8
8
|
import "./chunk-B7PUBQQM.js";
|
|
9
9
|
import "./chunk-I35CTGPO.js";
|
|
10
10
|
import "./chunk-OB42YVAE.js";
|
|
@@ -8,17 +8,23 @@ import {
|
|
|
8
8
|
reportDate,
|
|
9
9
|
reportTime,
|
|
10
10
|
signals,
|
|
11
|
-
summaryFromRow
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
import
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
import "
|
|
18
|
-
import "
|
|
19
|
-
import "
|
|
20
|
-
import "
|
|
21
|
-
import "
|
|
11
|
+
summaryFromRow,
|
|
12
|
+
usageTokens
|
|
13
|
+
} from "./chunk-6U26PYI5.js";
|
|
14
|
+
import {
|
|
15
|
+
actorDirectoryReportSchema
|
|
16
|
+
} from "./chunk-VFH4ZKZT.js";
|
|
17
|
+
import "./chunk-LUAE4MGW.js";
|
|
18
|
+
import "./chunk-PDO5BLNM.js";
|
|
19
|
+
import "./chunk-35BNLDOJ.js";
|
|
20
|
+
import "./chunk-EEZCY5WX.js";
|
|
21
|
+
import "./chunk-LVA4I4H7.js";
|
|
22
|
+
import "./chunk-B7PUBQQM.js";
|
|
23
|
+
import "./chunk-I35CTGPO.js";
|
|
24
|
+
import "./chunk-OB42YVAE.js";
|
|
25
|
+
import "./chunk-6GWA276C.js";
|
|
26
|
+
import "./chunk-7FBGKXPE.js";
|
|
27
|
+
import "./chunk-MLKGABMK.js";
|
|
22
28
|
|
|
23
29
|
// src/api/people/list.query.ts
|
|
24
30
|
function directoryItem(accumulator) {
|
|
@@ -32,12 +38,12 @@ function directoryItem(accumulator) {
|
|
|
32
38
|
hung: accumulator.hung,
|
|
33
39
|
lastSeenAt: new Date(accumulator.lastSeenMs).toISOString(),
|
|
34
40
|
actor: accumulator.actor,
|
|
35
|
-
|
|
41
|
+
...accumulator.tokens !== void 0 ? { tokens: accumulator.tokens } : {}
|
|
36
42
|
};
|
|
37
43
|
}
|
|
38
|
-
async function readPeopleListFromSql(
|
|
44
|
+
async function readPeopleListFromSql() {
|
|
39
45
|
const nowMs = Date.now();
|
|
40
|
-
const { rows, truncated } = await actorRows(
|
|
46
|
+
const { rows, truncated } = await actorRows();
|
|
41
47
|
const people = /* @__PURE__ */ new Map();
|
|
42
48
|
for (const row of rows) {
|
|
43
49
|
const summary = summaryFromRow(row, nowMs);
|
|
@@ -55,7 +61,11 @@ async function readPeopleListFromSql(options = {}) {
|
|
|
55
61
|
};
|
|
56
62
|
accumulator.actor = mergeIdentity(accumulator.actor, actor);
|
|
57
63
|
accumulator.conversations += 1;
|
|
58
|
-
accumulator.
|
|
64
|
+
accumulator.durationMs += summary.cumulativeDurationMs;
|
|
65
|
+
const tokens = usageTokens(row);
|
|
66
|
+
if (tokens !== void 0) {
|
|
67
|
+
accumulator.tokens = (accumulator.tokens ?? 0) + tokens;
|
|
68
|
+
}
|
|
59
69
|
addSignals(accumulator, signals(summary));
|
|
60
70
|
accumulator.firstSeenMs = Math.min(accumulator.firstSeenMs, firstSeenMs);
|
|
61
71
|
accumulator.lastSeenMs = Math.max(accumulator.lastSeenMs, lastSeenMs);
|
|
@@ -76,7 +86,7 @@ async function readPeopleListFromSql(options = {}) {
|
|
|
76
86
|
|
|
77
87
|
// src/api/people/list.ts
|
|
78
88
|
async function readPeopleList() {
|
|
79
|
-
return readPeopleListFromSql();
|
|
89
|
+
return actorDirectoryReportSchema.parse(await readPeopleListFromSql());
|
|
80
90
|
}
|
|
81
91
|
export {
|
|
82
92
|
readPeopleList
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import {
|
|
2
|
+
readConversationFeedFromSql
|
|
3
|
+
} from "./chunk-ON6YKIQ7.js";
|
|
4
|
+
import {
|
|
5
|
+
conversationFeedSchema
|
|
6
|
+
} from "./chunk-LUAE4MGW.js";
|
|
7
|
+
import "./chunk-NG2AV7IB.js";
|
|
8
|
+
import "./chunk-PDO5BLNM.js";
|
|
9
|
+
import "./chunk-WTYEKPXU.js";
|
|
10
|
+
import "./chunk-35BNLDOJ.js";
|
|
11
|
+
import "./chunk-4ZNGQH7C.js";
|
|
12
|
+
import "./chunk-EEZCY5WX.js";
|
|
13
|
+
import "./chunk-LVA4I4H7.js";
|
|
14
|
+
import "./chunk-B7PUBQQM.js";
|
|
15
|
+
import "./chunk-I35CTGPO.js";
|
|
16
|
+
import "./chunk-OB42YVAE.js";
|
|
17
|
+
import "./chunk-6GWA276C.js";
|
|
18
|
+
import "./chunk-7FBGKXPE.js";
|
|
19
|
+
import "./chunk-MLKGABMK.js";
|
|
20
|
+
|
|
21
|
+
// src/api/conversations/list.ts
|
|
22
|
+
async function readConversationFeed() {
|
|
23
|
+
return conversationFeedSchema.parse(await readConversationFeedFromSql());
|
|
24
|
+
}
|
|
25
|
+
export {
|
|
26
|
+
readConversationFeed
|
|
27
|
+
};
|
package/dist/nitro.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type JuniorPluginSet } from "./plugins";
|
|
2
2
|
import type { JuniorDashboardOptions } from "./app";
|
|
3
|
-
export type JuniorNitroDashboardOptions =
|
|
3
|
+
export type JuniorNitroDashboardOptions = JuniorDashboardOptions;
|
|
4
4
|
export interface JuniorPluginModuleReference {
|
|
5
5
|
/** Runtime-safe module that exports a `defineJuniorPlugins(...)` set. */
|
|
6
6
|
module: string;
|
package/dist/nitro.js
CHANGED
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
discoverInstalledPluginPackageContent,
|
|
18
18
|
isValidPackageName,
|
|
19
19
|
resolvePackageDir
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-B3IT5END.js";
|
|
21
21
|
import {
|
|
22
22
|
JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE,
|
|
23
23
|
JUNIOR_HEARTBEAT_CRON_SCHEDULE,
|
|
@@ -26,6 +26,7 @@ import {
|
|
|
26
26
|
JUNIOR_RETENTION_CRON_SCHEDULE,
|
|
27
27
|
JUNIOR_RETENTION_ROUTE
|
|
28
28
|
} from "./chunk-7FBGKXPE.js";
|
|
29
|
+
import "./chunk-3V7OFJZC.js";
|
|
29
30
|
import "./chunk-MLKGABMK.js";
|
|
30
31
|
|
|
31
32
|
// src/nitro.ts
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import {
|
|
2
|
+
readConversationFeedFromSql
|
|
3
|
+
} from "./chunk-ON6YKIQ7.js";
|
|
4
|
+
import "./chunk-NG2AV7IB.js";
|
|
5
|
+
import "./chunk-WTYEKPXU.js";
|
|
6
|
+
import "./chunk-35BNLDOJ.js";
|
|
7
|
+
import "./chunk-4ZNGQH7C.js";
|
|
8
|
+
import "./chunk-EEZCY5WX.js";
|
|
9
|
+
import "./chunk-LVA4I4H7.js";
|
|
10
|
+
import "./chunk-B7PUBQQM.js";
|
|
11
|
+
import "./chunk-I35CTGPO.js";
|
|
12
|
+
import "./chunk-OB42YVAE.js";
|
|
13
|
+
import "./chunk-6GWA276C.js";
|
|
14
|
+
import "./chunk-7FBGKXPE.js";
|
|
15
|
+
import "./chunk-MLKGABMK.js";
|
|
16
|
+
|
|
17
|
+
// src/reporting/plugin-conversations.ts
|
|
18
|
+
async function listRecentConversationSummaries(requestedLimit = 25) {
|
|
19
|
+
const limit = Math.max(0, Math.min(100, Math.floor(requestedLimit)));
|
|
20
|
+
const feed = await readConversationFeedFromSql(limit);
|
|
21
|
+
return feed.conversations.map((report) => {
|
|
22
|
+
return {
|
|
23
|
+
conversationId: report.conversationId,
|
|
24
|
+
displayTitle: report.displayTitle,
|
|
25
|
+
lastActivityAt: report.lastSeenAt,
|
|
26
|
+
lastUpdatedAt: report.lastProgressAt,
|
|
27
|
+
status: report.status,
|
|
28
|
+
...report.channelName ? { channelName: report.channelName } : {},
|
|
29
|
+
...report.channelNameRedacted ? { channelNameRedacted: true } : {},
|
|
30
|
+
source: report.surface
|
|
31
|
+
};
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
export {
|
|
35
|
+
listRecentConversationSummaries
|
|
36
|
+
};
|
|
@@ -17,17 +17,23 @@ import {
|
|
|
17
17
|
slackLocationLabel,
|
|
18
18
|
statsItems,
|
|
19
19
|
summaryFromRow,
|
|
20
|
-
surfaceLabel
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
import
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
import "
|
|
27
|
-
import "
|
|
28
|
-
import "
|
|
29
|
-
import "
|
|
30
|
-
import "
|
|
20
|
+
surfaceLabel,
|
|
21
|
+
usageTokens
|
|
22
|
+
} from "./chunk-6U26PYI5.js";
|
|
23
|
+
import {
|
|
24
|
+
actorProfileReportSchema
|
|
25
|
+
} from "./chunk-VFH4ZKZT.js";
|
|
26
|
+
import "./chunk-LUAE4MGW.js";
|
|
27
|
+
import "./chunk-PDO5BLNM.js";
|
|
28
|
+
import "./chunk-35BNLDOJ.js";
|
|
29
|
+
import "./chunk-EEZCY5WX.js";
|
|
30
|
+
import "./chunk-LVA4I4H7.js";
|
|
31
|
+
import "./chunk-B7PUBQQM.js";
|
|
32
|
+
import "./chunk-I35CTGPO.js";
|
|
33
|
+
import "./chunk-OB42YVAE.js";
|
|
34
|
+
import "./chunk-6GWA276C.js";
|
|
35
|
+
import "./chunk-7FBGKXPE.js";
|
|
36
|
+
import "./chunk-MLKGABMK.js";
|
|
31
37
|
|
|
32
38
|
// src/api/people/profile.query.ts
|
|
33
39
|
function emptyProfile(email, nowMs) {
|
|
@@ -51,13 +57,13 @@ function emptyProfile(email, nowMs) {
|
|
|
51
57
|
windowStart: start.toISOString()
|
|
52
58
|
};
|
|
53
59
|
}
|
|
54
|
-
async function readPeopleProfileFromSql(email
|
|
60
|
+
async function readPeopleProfileFromSql(email) {
|
|
55
61
|
const nowMs = Date.now();
|
|
56
62
|
const normalizedEmail = normalizeEmail(email);
|
|
57
63
|
if (!normalizedEmail) {
|
|
58
64
|
return emptyProfile("", nowMs);
|
|
59
65
|
}
|
|
60
|
-
const { rows, truncated } = await actorRows(
|
|
66
|
+
const { rows, truncated } = await actorRows(normalizedEmail);
|
|
61
67
|
let actor;
|
|
62
68
|
const totals = emptyTotals();
|
|
63
69
|
const activeDates = /* @__PURE__ */ new Set();
|
|
@@ -75,26 +81,35 @@ async function readPeopleProfileFromSql(email, options = {}) {
|
|
|
75
81
|
const value = signals(summary);
|
|
76
82
|
const date = reportDate(summary.lastSeenAt);
|
|
77
83
|
totals.conversations += 1;
|
|
78
|
-
totals.
|
|
84
|
+
totals.durationMs += summary.cumulativeDurationMs;
|
|
85
|
+
const tokens = usageTokens(row);
|
|
86
|
+
if (tokens !== void 0) totals.tokens = (totals.tokens ?? 0) + tokens;
|
|
79
87
|
addSignals(totals, value);
|
|
80
88
|
if (date) {
|
|
81
89
|
activeDates.add(date);
|
|
82
90
|
const day = days.get(date) ?? emptyActivityDay(date);
|
|
83
91
|
day.conversations += 1;
|
|
84
|
-
day.
|
|
92
|
+
day.durationMs += summary.cumulativeDurationMs;
|
|
93
|
+
if (tokens !== void 0) day.tokens = (day.tokens ?? 0) + tokens;
|
|
85
94
|
addSignals(day, value);
|
|
86
95
|
days.set(date, day);
|
|
87
96
|
}
|
|
88
97
|
const location = slackLocationLabel(summary) ?? surfaceLabel(summary.surface);
|
|
89
98
|
const locationItem = locations.get(location) ?? emptyStatsItem(location);
|
|
90
99
|
locationItem.conversations += 1;
|
|
91
|
-
locationItem.
|
|
100
|
+
locationItem.durationMs += summary.cumulativeDurationMs;
|
|
101
|
+
if (tokens !== void 0) {
|
|
102
|
+
locationItem.tokens = (locationItem.tokens ?? 0) + tokens;
|
|
103
|
+
}
|
|
92
104
|
addSignals(locationItem, value);
|
|
93
105
|
locations.set(location, locationItem);
|
|
94
106
|
const surface = surfaceLabel(summary.surface);
|
|
95
107
|
const surfaceItem = surfaces.get(surface) ?? emptyStatsItem(surface);
|
|
96
108
|
surfaceItem.conversations += 1;
|
|
97
|
-
surfaceItem.
|
|
109
|
+
surfaceItem.durationMs += summary.cumulativeDurationMs;
|
|
110
|
+
if (tokens !== void 0) {
|
|
111
|
+
surfaceItem.tokens = (surfaceItem.tokens ?? 0) + tokens;
|
|
112
|
+
}
|
|
98
113
|
addSignals(surfaceItem, value);
|
|
99
114
|
surfaces.set(surface, surfaceItem);
|
|
100
115
|
}
|
|
@@ -124,7 +139,7 @@ async function readPeopleProfileFromSql(email, options = {}) {
|
|
|
124
139
|
|
|
125
140
|
// src/api/people/profile.ts
|
|
126
141
|
async function readPeopleProfile(email) {
|
|
127
|
-
return readPeopleProfileFromSql(email);
|
|
142
|
+
return actorProfileReportSchema.parse(await readPeopleProfileFromSql(email));
|
|
128
143
|
}
|
|
129
144
|
export {
|
|
130
145
|
readPeopleProfile
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { PluginConversationSummary } from "@sentry/junior-plugin-api";
|
|
2
|
+
/** Supply bounded SQL conversation metadata to plugin operational reports. */
|
|
3
|
+
export declare function listRecentConversationSummaries(requestedLimit?: number): Promise<PluginConversationSummary[]>;
|