@danypops/tickets 0.14.1 → 0.16.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@danypops/tickets",
3
- "version": "0.14.1",
3
+ "version": "0.16.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",
@@ -11,8 +11,19 @@
11
11
  "main": "./src/index.ts",
12
12
  "types": "./src/index.ts",
13
13
  "exports": {
14
- ".": "./src/index.ts"
14
+ ".": "./src/index.ts",
15
+ "./auth": "./src/auth/index.ts",
16
+ "./cli": "./src/cli/client-exports.ts",
17
+ "./config": "./src/config/index.ts",
18
+ "./github": "./src/github/index.ts",
19
+ "./gitlab": "./src/gitlab/index.ts",
20
+ "./issue": "./src/issue/index.ts",
21
+ "./jira": "./src/jira/index.ts",
22
+ "./rpc": "./src/rpc/index.ts",
23
+ "./sqlite": "./src/sqlite/index.ts",
24
+ "./package.json": "./package.json"
15
25
  },
26
+ "sideEffects": false,
16
27
  "files": [
17
28
  "src",
18
29
  "README.md",
@@ -36,7 +47,7 @@
36
47
  },
37
48
  "dependencies": {
38
49
  "@danypops/vehicle-core": "^0.15.0",
39
- "@danypops/vehicle-server": "^0.21.1",
50
+ "@danypops/vehicle-server": "^0.24.1",
40
51
  "@danypops/vehicle-client": "^0.8.1",
41
52
  "@danypops/enigma-client": "^0.6.1",
42
53
  "@gitbeaker/rest": "^43.8.0",
@@ -0,0 +1,6 @@
1
+ export { openUrl } from "./browser.js";
2
+ export * from "./device-flow.js";
3
+ export * from "./github-oauth.js";
4
+ export * from "./gitlab-oauth.js";
5
+ export * from "./jira-oauth.js";
6
+ export * from "./token-store.js";
@@ -0,0 +1,9 @@
1
+ export {
2
+ createTicketsClient,
3
+ type EnsureDaemonOptions,
4
+ ensureDaemonRunning,
5
+ resolveVehicleClientTarget,
6
+ type TicketsRpcClient,
7
+ ticketsPaths,
8
+ type VehicleClientTarget,
9
+ } from "./tickets-client.js";
@@ -0,0 +1,8 @@
1
+ export {
2
+ type BackendConfig,
3
+ buildRepositories,
4
+ type Config,
5
+ configDir,
6
+ defaultConfigPath,
7
+ loadConfig,
8
+ } from "./config.js";
@@ -0,0 +1 @@
1
+ export { type GitHubOptions, GitHubRepository } from "./github.js";
@@ -0,0 +1 @@
1
+ export { type GitLabOptions, GitLabRepository } from "./gitlab.js";
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";
@@ -0,0 +1,4 @@
1
+ export * from "./errors.js";
2
+ export * from "./issue.js";
3
+ export * from "./repository.js";
4
+ export { type BackendCapabilities, NotSupportedError, TicketService, UnknownBackendError } from "./service.js";
@@ -0,0 +1 @@
1
+ export { type JiraOptions, JiraRepository } from "./jira.js";
@@ -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),
@@ -0,0 +1,2 @@
1
+ export type { TicketOperation, TicketOpInputs, TicketOpOutputs } from "./ops.js";
2
+ export { TICKETS_VEHICLE_NAME } from "./ops.js";
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;
@@ -0,0 +1 @@
1
+ export type { FocusStatus, TicketFocusState } from "./focus.js";