@kenkaiiii/ggcoder 5.84.3 → 5.85.0

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.
Files changed (38) hide show
  1. package/dist/app-sidecar/auth-routes.js +2 -0
  2. package/dist/app-sidecar/auth-routes.js.map +1 -1
  3. package/dist/app-sidecar/goal-routes.js +1 -0
  4. package/dist/app-sidecar/goal-routes.js.map +1 -1
  5. package/dist/app-sidecar/integration-routes.js +4 -0
  6. package/dist/app-sidecar/integration-routes.js.map +1 -1
  7. package/dist/app-sidecar/mcp-routes.js +1 -0
  8. package/dist/app-sidecar/mcp-routes.js.map +1 -1
  9. package/dist/app-sidecar/prompt-routes.js +67 -1
  10. package/dist/app-sidecar/prompt-routes.js.map +1 -1
  11. package/dist/app-sidecar/route-context.d.ts +2 -0
  12. package/dist/app-sidecar/run-control-routes.js +12 -0
  13. package/dist/app-sidecar/run-control-routes.js.map +1 -1
  14. package/dist/app-sidecar/task-routes.js +2 -0
  15. package/dist/app-sidecar/task-routes.js.map +1 -1
  16. package/dist/app-sidecar/trophy-manager.d.ts +15 -0
  17. package/dist/app-sidecar/trophy-manager.js +71 -0
  18. package/dist/app-sidecar/trophy-manager.js.map +1 -0
  19. package/dist/app-sidecar/workspace-routes.js +1 -0
  20. package/dist/app-sidecar/workspace-routes.js.map +1 -1
  21. package/dist/app-sidecar.js +52 -5
  22. package/dist/app-sidecar.js.map +1 -1
  23. package/dist/core/trophies/catalog-more.d.ts +2 -0
  24. package/dist/core/trophies/catalog-more.js +857 -0
  25. package/dist/core/trophies/catalog-more.js.map +1 -0
  26. package/dist/core/trophies/catalog.d.ts +4 -0
  27. package/dist/core/trophies/catalog.js +649 -0
  28. package/dist/core/trophies/catalog.js.map +1 -0
  29. package/dist/core/trophies/engine.d.ts +70 -0
  30. package/dist/core/trophies/engine.js +351 -0
  31. package/dist/core/trophies/engine.js.map +1 -0
  32. package/dist/core/trophies/store.d.ts +17 -0
  33. package/dist/core/trophies/store.js +113 -0
  34. package/dist/core/trophies/store.js.map +1 -0
  35. package/dist/core/trophies/types.d.ts +119 -0
  36. package/dist/core/trophies/types.js +78 -0
  37. package/dist/core/trophies/types.js.map +1 -0
  38. package/package.json +4 -4
@@ -0,0 +1,119 @@
1
+ export type TrophyTier = "bronze" | "silver" | "gold" | "platinum";
2
+ export type TrophyCategory = "start" | "flow" | "power" | "goals" | "modes" | "ship" | "habit" | "secret";
3
+ /** Things the sidecar counts as they happen. */
4
+ export declare const TROPHY_COUNTERS: readonly ["slashCommands", "customCommands", "enhancedSends", "attachments", "fileMentions", "steers", "newSessions", "modelSwitches", "thinkingChanges", "plansApproved", "kenQuestions", "questionsAnswered", "autopilotReviews", "tasksRun", "mcpRuns", "localRuns", "webRuns", "subagentRuns", "backgroundRuns", "skillRuns", "addDirs", "exports", "goalsStarted", "goalWorkers", "chatRuns", "motionRuns", "nightRuns", "longRuns", "scheduledRuns", "compactions", "pushes", "pullRequests", "screenshots", "debugRuns", "uiComponents", "remoteStarts", "telegramSetups", "mcpServersAdded", "modelsPulled", "localEndpoints", "transcriptImports", "radioPlays", "goalPauses", "kenPins", "queueCancels", "processKills", "cancels", "memoriesSaved", "soulNotes", "codeSearches", "codeNavs", "checklistRecords", "filesTouched", "bigRuns", "earlyRuns", "weekendRuns", "autopilotOn", "handoffs"];
5
+ export type TrophyCounter = (typeof TROPHY_COUNTERS)[number];
6
+ /** Distinct things the sidecar remembers (models used, tools seen, …). */
7
+ export declare const TROPHY_SETS: readonly ["slashCommandNames", "modelsUsed", "toolsUsed", "chatAgents", "skillsUsed", "providersUsed", "radioStations", "checklistItems", "projects"];
8
+ export type TrophySet = (typeof TROPHY_SETS)[number];
9
+ /**
10
+ * Totals read from the XP/rank progress file rather than counted twice.
11
+ * Trophies count only what happens after they began: each stat is measured
12
+ * from the baseline taken when the trophies file was created.
13
+ */
14
+ export type TrophyProgressStat = "prompts" | "commits" | "linesShipped" | "level";
15
+ export type TrophyStat = {
16
+ kind: "count";
17
+ key: TrophyCounter;
18
+ } | {
19
+ kind: "distinct";
20
+ key: TrophySet;
21
+ } | {
22
+ kind: "progress";
23
+ key: TrophyProgressStat;
24
+ }
25
+ /** Best run of consecutive days with a finished run, since trophies began. */
26
+ | {
27
+ kind: "streak";
28
+ }
29
+ /** How many other trophies are earned. */
30
+ | {
31
+ kind: "earned";
32
+ };
33
+ export interface TrophyDef {
34
+ id: string;
35
+ title: string;
36
+ tier: TrophyTier;
37
+ category: TrophyCategory;
38
+ /** What the trophy marks, and what the feature behind it does. */
39
+ description: string;
40
+ /** How to earn it, in plain words. */
41
+ hint: string;
42
+ stat: TrophyStat;
43
+ /** The stat value that earns it. */
44
+ goal: number;
45
+ /** Hidden until earned: the title, description and hint stay secret. */
46
+ secret?: boolean;
47
+ }
48
+ /** The facts the progress file contributes. */
49
+ export interface TrophyProgressFacts {
50
+ prompts: number;
51
+ commits: number;
52
+ linesShipped: number;
53
+ level: number;
54
+ }
55
+ /** A change to record: counters to add to, and members to add to sets. */
56
+ export interface TrophyDelta {
57
+ count?: Partial<Record<TrophyCounter, number>>;
58
+ add?: Partial<Record<TrophySet, readonly string[]>>;
59
+ /** Local date (YYYY-MM-DD) of a finished run, for the day streak. */
60
+ activeDay?: string;
61
+ }
62
+ /** Consecutive days with a finished run. */
63
+ export interface TrophyStreak {
64
+ /** Last local date (YYYY-MM-DD) with a finished run, or null. */
65
+ last: string | null;
66
+ current: number;
67
+ best: number;
68
+ }
69
+ /** The last recorded unlock, so every window celebrates it exactly once. */
70
+ export interface TrophyLastEvent {
71
+ nonce: string;
72
+ unlocked: string[];
73
+ }
74
+ /** Durable trophies file (~/.gg/trophies.json). */
75
+ export interface TrophyFile {
76
+ /** 1 was a pre-release format that credited past XP; it's discarded on load. */
77
+ v: 2;
78
+ createdAt: string;
79
+ /** XP totals when trophies began; progress stats count from here. */
80
+ baseline: TrophyProgressFacts | null;
81
+ streak: TrophyStreak;
82
+ counters: Partial<Record<TrophyCounter, number>>;
83
+ sets: Partial<Record<TrophySet, string[]>>;
84
+ /** Trophy id to the ISO time it was earned. */
85
+ unlocked: Record<string, string>;
86
+ lastEvent: TrophyLastEvent | null;
87
+ }
88
+ /** One trophy as the app shows it. Secret, unearned trophies arrive redacted. */
89
+ export interface TrophyView {
90
+ id: string;
91
+ title: string;
92
+ tier: TrophyTier;
93
+ category: TrophyCategory;
94
+ description: string;
95
+ hint: string;
96
+ goal: number;
97
+ /** Progress toward `goal`, capped at `goal`. */
98
+ current: number;
99
+ /** ISO time it was earned, or null. */
100
+ unlockedAt: string | null;
101
+ secret: boolean;
102
+ }
103
+ export interface TrophyCategoryView {
104
+ id: TrophyCategory;
105
+ label: string;
106
+ }
107
+ /** What the sidecar serves and broadcasts; the app renders it as is. */
108
+ export interface TrophySnapshot {
109
+ trophies: TrophyView[];
110
+ categories: TrophyCategoryView[];
111
+ earned: number;
112
+ total: number;
113
+ /** Ids earned by the event this snapshot was produced by (empty otherwise). */
114
+ unlocked: string[];
115
+ /** Nonce of that event, for celebration dedupe. */
116
+ eventNonce: string | null;
117
+ /** True only on the frame sent to the window whose action earned them. */
118
+ origin?: boolean;
119
+ }
@@ -0,0 +1,78 @@
1
+ // Trophies: shared types for the catalog, the pure engine, the store and the
2
+ // snapshot the app renders.
3
+ /** Things the sidecar counts as they happen. */
4
+ export const TROPHY_COUNTERS = [
5
+ "slashCommands",
6
+ "customCommands",
7
+ "enhancedSends",
8
+ "attachments",
9
+ "fileMentions",
10
+ "steers",
11
+ "newSessions",
12
+ "modelSwitches",
13
+ "thinkingChanges",
14
+ "plansApproved",
15
+ "kenQuestions",
16
+ "questionsAnswered",
17
+ "autopilotReviews",
18
+ "tasksRun",
19
+ "mcpRuns",
20
+ "localRuns",
21
+ "webRuns",
22
+ "subagentRuns",
23
+ "backgroundRuns",
24
+ "skillRuns",
25
+ "addDirs",
26
+ "exports",
27
+ "goalsStarted",
28
+ "goalWorkers",
29
+ "chatRuns",
30
+ "motionRuns",
31
+ "nightRuns",
32
+ "longRuns",
33
+ // Added with the 100-trophy catalog.
34
+ "scheduledRuns",
35
+ "compactions",
36
+ "pushes",
37
+ "pullRequests",
38
+ "screenshots",
39
+ "debugRuns",
40
+ "uiComponents",
41
+ "remoteStarts",
42
+ "telegramSetups",
43
+ "mcpServersAdded",
44
+ "modelsPulled",
45
+ "localEndpoints",
46
+ "transcriptImports",
47
+ "radioPlays",
48
+ "goalPauses",
49
+ "kenPins",
50
+ "queueCancels",
51
+ "processKills",
52
+ "cancels",
53
+ "memoriesSaved",
54
+ "soulNotes",
55
+ "codeSearches",
56
+ "codeNavs",
57
+ "checklistRecords",
58
+ "filesTouched",
59
+ "bigRuns",
60
+ "earlyRuns",
61
+ "weekendRuns",
62
+ "autopilotOn",
63
+ "handoffs",
64
+ ];
65
+ /** Distinct things the sidecar remembers (models used, tools seen, …). */
66
+ export const TROPHY_SETS = [
67
+ "slashCommandNames",
68
+ "modelsUsed",
69
+ "toolsUsed",
70
+ "chatAgents",
71
+ "skillsUsed",
72
+ "providersUsed",
73
+ "radioStations",
74
+ "checklistItems",
75
+ /** Projects worked in, as short hashes of their paths. */
76
+ "projects",
77
+ ];
78
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/core/trophies/types.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,4BAA4B;AAO5B,gDAAgD;AAChD,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,eAAe;IACf,gBAAgB;IAChB,eAAe;IACf,aAAa;IACb,cAAc;IACd,QAAQ;IACR,aAAa;IACb,eAAe;IACf,iBAAiB;IACjB,eAAe;IACf,cAAc;IACd,mBAAmB;IACnB,kBAAkB;IAClB,UAAU;IACV,SAAS;IACT,WAAW;IACX,SAAS;IACT,cAAc;IACd,gBAAgB;IAChB,WAAW;IACX,SAAS;IACT,SAAS;IACT,cAAc;IACd,aAAa;IACb,UAAU;IACV,YAAY;IACZ,WAAW;IACX,UAAU;IACV,qCAAqC;IACrC,eAAe;IACf,aAAa;IACb,QAAQ;IACR,cAAc;IACd,aAAa;IACb,WAAW;IACX,cAAc;IACd,cAAc;IACd,gBAAgB;IAChB,iBAAiB;IACjB,cAAc;IACd,gBAAgB;IAChB,mBAAmB;IACnB,YAAY;IACZ,YAAY;IACZ,SAAS;IACT,cAAc;IACd,cAAc;IACd,SAAS;IACT,eAAe;IACf,WAAW;IACX,cAAc;IACd,UAAU;IACV,kBAAkB;IAClB,cAAc;IACd,SAAS;IACT,WAAW;IACX,aAAa;IACb,aAAa;IACb,UAAU;CACF,CAAC;AAGX,0EAA0E;AAC1E,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,mBAAmB;IACnB,YAAY;IACZ,WAAW;IACX,YAAY;IACZ,YAAY;IACZ,eAAe;IACf,eAAe;IACf,gBAAgB;IAChB,0DAA0D;IAC1D,UAAU;CACF,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kenkaiiii/ggcoder",
3
- "version": "5.84.3",
3
+ "version": "5.85.0",
4
4
  "type": "module",
5
5
  "description": "Lean CLI coding agent for 12 LLM providers and local models, with OAuth for Anthropic, OpenAI and Gemini",
6
6
  "license": "MIT",
@@ -115,9 +115,9 @@
115
115
  "typescript-language-server": "^5.3.0",
116
116
  "wrap-ansi": "^10.0.0",
117
117
  "zod": "^4.4.3",
118
- "@kenkaiiii/gg-agent": "5.84.3",
119
- "@kenkaiiii/gg-ai": "5.84.3",
120
- "@kenkaiiii/gg-core": "5.84.3"
118
+ "@kenkaiiii/gg-agent": "5.85.0",
119
+ "@kenkaiiii/gg-ai": "5.85.0",
120
+ "@kenkaiiii/gg-core": "5.85.0"
121
121
  },
122
122
  "optionalDependencies": {
123
123
  "@huggingface/transformers": "4.2.0",