@danypops/tickets 0.14.1 → 0.15.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.
- package/package.json +2 -2
- package/src/index.ts +1 -0
- package/src/process/bootstrap.ts +16 -1
- package/src/rpc/ops.ts +9 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@danypops/tickets",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.15.0",
|
|
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",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@danypops/vehicle-core": "^0.15.0",
|
|
39
|
-
"@danypops/vehicle-server": "^0.
|
|
39
|
+
"@danypops/vehicle-server": "^0.24.1",
|
|
40
40
|
"@danypops/vehicle-client": "^0.8.1",
|
|
41
41
|
"@danypops/enigma-client": "^0.6.1",
|
|
42
42
|
"@gitbeaker/rest": "^43.8.0",
|
package/src/index.ts
CHANGED
|
@@ -31,4 +31,5 @@ export * from "./issue/repository.js";
|
|
|
31
31
|
export { type BackendCapabilities, NotSupportedError, TicketService, UnknownBackendError } from "./issue/service.js";
|
|
32
32
|
export { type JiraOptions, JiraRepository } from "./jira/jira.js";
|
|
33
33
|
export type { TicketOperation, TicketOpInputs, TicketOpOutputs } from "./rpc/ops.js";
|
|
34
|
+
export { TICKETS_VEHICLE_NAME } from "./rpc/ops.js";
|
|
34
35
|
export type { FocusStatus, TicketFocusState } from "./sqlite/focus.js";
|
package/src/process/bootstrap.ts
CHANGED
|
@@ -14,7 +14,7 @@ import { createTicketsVehicleRegistry, syncDiscoverAvailability } from "../agent
|
|
|
14
14
|
import { type BuildRepositories, buildRepositories, type Config, createBackendRefreshTask, loadConfig } from "../config/config.js";
|
|
15
15
|
import type { IssueRepository } from "../issue/repository.js";
|
|
16
16
|
import { TicketService } from "../issue/service.js";
|
|
17
|
-
import { TICKETS_DAEMON_NAMES } from "../rpc/ops.js";
|
|
17
|
+
import { TICKETS_DAEMON_NAMES, TICKETS_VEHICLE_NAME } from "../rpc/ops.js";
|
|
18
18
|
import { buildApp, type TicketsAppDeps } from "../rpc/server.js";
|
|
19
19
|
import { FOCUS_MIGRATIONS, FOCUS_STALE_AFTER_MS, FocusStore } from "../sqlite/focus.js";
|
|
20
20
|
import { LEDGER_MIGRATIONS, Ledger } from "../sqlite/ledger.js";
|
|
@@ -121,6 +121,21 @@ export async function bootstrap(opts: BootstrapOptions = {}): Promise<Bootstrapp
|
|
|
121
121
|
const options: StartDaemonOptions = {
|
|
122
122
|
daemonLabel: "Tickets",
|
|
123
123
|
handlePath: paths.handle,
|
|
124
|
+
// Registers tickets into the shared, cross-package Vehicle Handle Directory (see
|
|
125
|
+
// @danypops/vehicle-server's startDaemon/resolveSharedVehicleHandlePath) -- the seam a
|
|
126
|
+
// broker-mode tools_list/tools_man discovery scan (in another live Vehicle-backed extension,
|
|
127
|
+
// e.g. Papyrus or Pipes) reads without needing to already know tickets' own state-directory
|
|
128
|
+
// convention in advance. Mirrors papyrus/pipes/web-spider/packed's own implementations of the
|
|
129
|
+
// same rollout. tokenPath lets a discovering broker authenticate; write/remove failures are
|
|
130
|
+
// logged, never fatal (startDaemon's own contract). Must match pi-tickets' own
|
|
131
|
+
// shell.broker.ownVehicleName exactly.
|
|
132
|
+
vehicleName: TICKETS_VEHICLE_NAME,
|
|
133
|
+
tokenPath: paths.token,
|
|
134
|
+
// Without this, the shared-handle write above would resolve against the real process.env's
|
|
135
|
+
// XDG_RUNTIME_DIR regardless of opts.pathEnv -- fine in production (there is no other env),
|
|
136
|
+
// but it would silently defeat a test's own scratch PathEnvironment, writing (and later
|
|
137
|
+
// failing to find) the shared entry in the wrong directory entirely.
|
|
138
|
+
env: opts.pathEnv?.env,
|
|
124
139
|
logger,
|
|
125
140
|
maintenanceTasks: [
|
|
126
141
|
createSyncTask(service, ledger, opts.syncIntervalMs ?? DEFAULT_SYNC_INTERVAL_MS, logger),
|
package/src/rpc/ops.ts
CHANGED
|
@@ -229,3 +229,12 @@ export const TICKETS_DAEMON_NAMES = {
|
|
|
229
229
|
handleFilename: "handle.json",
|
|
230
230
|
systemdUnitName: "tickets-daemon.service",
|
|
231
231
|
} as const;
|
|
232
|
+
|
|
233
|
+
/**
|
|
234
|
+
* Tickets' own stable identity name in the shared, cross-package Vehicle Handle Directory (see
|
|
235
|
+
* @danypops/vehicle-server's resolveSharedVehicleHandlePath) -- must match the ownVehicleName a
|
|
236
|
+
* broker-mode consumer (e.g. Papyrus, Pi Packed, Pipes) discovers it under, and process/
|
|
237
|
+
* bootstrap.ts's own StartDaemonOptions.vehicleName exactly. Derived from TICKETS_DAEMON_NAMES
|
|
238
|
+
* rather than a second hand-typed literal so the two can never drift apart.
|
|
239
|
+
*/
|
|
240
|
+
export const TICKETS_VEHICLE_NAME = TICKETS_DAEMON_NAMES.stateDirectoryName;
|