@danypops/tickets 0.16.1 → 0.16.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/README.md +8 -8
- package/package.json +2 -2
- package/src/process/bootstrap.ts +15 -1
package/README.md
CHANGED
|
@@ -237,14 +237,14 @@ scoped client token is the least-privilege default.
|
|
|
237
237
|
|
|
238
238
|
## The `pi-tickets` extension
|
|
239
239
|
|
|
240
|
-
Published as `@danypops/pi-tickets`. `../pi-tickets/` (this repo's workspace member) registers
|
|
241
|
-
|
|
242
|
-
`
|
|
243
|
-
`
|
|
244
|
-
`
|
|
245
|
-
`
|
|
246
|
-
through the same authenticated RPC client the CLI uses —
|
|
247
|
-
backend call or a direct SQLite open. OAuth login and daemon lifecycle
|
|
240
|
+
Published as `@danypops/pi-tickets`. `../pi-tickets/` (this repo's workspace member) registers one real Pi tool per operation—`issue_list`,
|
|
241
|
+
`issue_get`, `issue_create`, `issue_update`, `issue_search`,
|
|
242
|
+
`issue_children`, `issue_comments`, `issue_comment_add`, `backends_list`,
|
|
243
|
+
`ledger_search`, `ledger_stats`, `focus_set`, `focus_get`, `focus_pause`,
|
|
244
|
+
`focus_unpause`, `focus_clear`, `discover_fields`, `discover_statuses`,
|
|
245
|
+
`discover_template`—not a single action-dispatch mega-tool. Each talks to
|
|
246
|
+
the same daemon through the same authenticated RPC client the CLI uses —
|
|
247
|
+
never a direct backend call or a direct SQLite open. OAuth login and daemon lifecycle
|
|
248
248
|
control are deliberately **not** exposed here (neither as a tool action nor
|
|
249
249
|
as the `/tickets` command below): approving OAuth access requires a human in
|
|
250
250
|
a browser, and stopping a shared daemon is an operational decision, not
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@danypops/tickets",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.3",
|
|
4
4
|
"description": "Unified CLI, daemon, and TypeScript library for issue tracking across GitHub, GitLab, and Jira.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
49
|
"@danypops/vehicle-core": "^0.17.1",
|
|
50
|
-
"@danypops/vehicle-server": "^0.
|
|
50
|
+
"@danypops/vehicle-server": "^0.25.0",
|
|
51
51
|
"@danypops/vehicle-client": "^0.10.1",
|
|
52
52
|
"@danypops/enigma-client": "^0.6.1",
|
|
53
53
|
"@gitbeaker/rest": "^43.8.0",
|
package/src/process/bootstrap.ts
CHANGED
|
@@ -8,6 +8,9 @@
|
|
|
8
8
|
import type { Database } from "bun:sqlite";
|
|
9
9
|
import type { StartDaemonOptions } from "@danypops/vehicle-server/daemon";
|
|
10
10
|
import { createLogger, type Logger } from "@danypops/vehicle-server/logging";
|
|
11
|
+
import { openVehicleMetricsStore, type VehicleMetricsStore } from "@danypops/vehicle-server/metrics";
|
|
12
|
+
import { createVehicleMetricsMiddleware } from "@danypops/vehicle-server/metrics-middleware";
|
|
13
|
+
import { registerVehicleMetricsOperations } from "@danypops/vehicle-server/metrics-operations";
|
|
11
14
|
import { ensureAuthToken, type PathEnvironment, resolveDaemonPaths } from "@danypops/vehicle-server/paths";
|
|
12
15
|
import { checkpoint, openSqliteWithPragmas } from "@danypops/vehicle-server/storage";
|
|
13
16
|
import { createTicketsVehicleRegistry, syncDiscoverAvailability } from "../agent-tools/tickets-vehicle.js";
|
|
@@ -66,6 +69,7 @@ export interface BootstrappedDaemon {
|
|
|
66
69
|
watches: WatchStore;
|
|
67
70
|
sessionIdentity: SqliteSessionIdentityStore;
|
|
68
71
|
service: TicketService;
|
|
72
|
+
metrics: VehicleMetricsStore;
|
|
69
73
|
options: StartDaemonOptions;
|
|
70
74
|
}
|
|
71
75
|
|
|
@@ -118,6 +122,15 @@ export async function bootstrap(opts: BootstrapOptions = {}): Promise<Bootstrapp
|
|
|
118
122
|
onShutdownRequested,
|
|
119
123
|
} as TicketsAppDeps);
|
|
120
124
|
|
|
125
|
+
// Records how often each real operation is invoked (server-side, every caller) plus, via
|
|
126
|
+
// metrics.recordClientEvent, client-observed Vehicle Shell meta-tool calls -- see
|
|
127
|
+
// @danypops/vehicle-server's own metrics README section. Wired directly onto the same registry
|
|
128
|
+
// every real ticket operation is already registered on, so it's discoverable through the exact
|
|
129
|
+
// same tools_list/tools_man path as any other operation.
|
|
130
|
+
const metrics = openVehicleMetricsStore(paths.metrics);
|
|
131
|
+
vehicleRegistry.useExecutionMiddleware(createVehicleMetricsMiddleware(metrics, TICKETS_VEHICLE_NAME));
|
|
132
|
+
registerVehicleMetricsOperations(vehicleRegistry, metrics, TICKETS_VEHICLE_NAME);
|
|
133
|
+
|
|
121
134
|
const options: StartDaemonOptions = {
|
|
122
135
|
daemonLabel: "Tickets",
|
|
123
136
|
handlePath: paths.handle,
|
|
@@ -186,8 +199,9 @@ export async function bootstrap(opts: BootstrapOptions = {}): Promise<Bootstrapp
|
|
|
186
199
|
}),
|
|
187
200
|
onShutdown: () => {
|
|
188
201
|
db.close();
|
|
202
|
+
metrics.close();
|
|
189
203
|
},
|
|
190
204
|
};
|
|
191
205
|
|
|
192
|
-
return { db, ledger, focusStore, queries, stageStore, watches, sessionIdentity, service, options };
|
|
206
|
+
return { db, ledger, focusStore, queries, stageStore, watches, sessionIdentity, service, metrics, options };
|
|
193
207
|
}
|