@harness-engineering/types 0.6.0 → 0.8.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/dist/index.d.mts CHANGED
@@ -1,3 +1,66 @@
1
+ /**
2
+ * Represents a ticket created in an external tracking service.
3
+ */
4
+ interface ExternalTicket {
5
+ /** External identifier, e.g., "github:owner/repo#42" */
6
+ externalId: string;
7
+ /** URL to the ticket in the external service */
8
+ url: string;
9
+ }
10
+ /**
11
+ * Current state of a ticket in the external service.
12
+ * Pulled during syncFromExternal.
13
+ */
14
+ interface ExternalTicketState {
15
+ /** External identifier */
16
+ externalId: string;
17
+ /** External status (e.g., "open", "closed") */
18
+ status: string;
19
+ /** External labels (used for status disambiguation on GitHub) */
20
+ labels: string[];
21
+ /** Current assignee in the external service, or null */
22
+ assignee: string | null;
23
+ }
24
+ /**
25
+ * Result of a sync operation. Collects successes and errors per-feature.
26
+ */
27
+ interface SyncResult {
28
+ /** Tickets created during this sync */
29
+ created: ExternalTicket[];
30
+ /** External IDs of tickets that were updated */
31
+ updated: string[];
32
+ /** Assignment changes detected during pull */
33
+ assignmentChanges: Array<{
34
+ feature: string;
35
+ from: string | null;
36
+ to: string | null;
37
+ }>;
38
+ /** Per-feature errors (sync never throws) */
39
+ errors: Array<{
40
+ featureOrId: string;
41
+ error: Error;
42
+ }>;
43
+ }
44
+ /**
45
+ * Configuration for external tracker sync.
46
+ */
47
+ interface TrackerSyncConfig {
48
+ /** Adapter kind -- narrowed to GitHub-only for now */
49
+ kind: 'github';
50
+ /** Repository in "owner/repo" format (for GitHub) */
51
+ repo?: string;
52
+ /** Labels auto-applied to created tickets for filtering + identification */
53
+ labels?: string[];
54
+ /** Maps roadmap status -> external status string */
55
+ statusMap: Record<FeatureStatus, string>;
56
+ /**
57
+ * Maps external status (+ optional label) -> roadmap status.
58
+ * Compound keys like "open:in-progress" express state + label.
59
+ * Optional — when absent, syncFromExternal preserves current roadmap status.
60
+ */
61
+ reverseStatusMap?: Record<string, FeatureStatus>;
62
+ }
63
+
1
64
  /**
2
65
  * Token usage statistics for an agent turn or session.
3
66
  */
@@ -663,6 +726,11 @@ interface SkillLifecycleHooks {
663
726
  * Valid statuses for a roadmap feature.
664
727
  */
665
728
  type FeatureStatus = 'backlog' | 'planned' | 'in-progress' | 'done' | 'blocked';
729
+ /**
730
+ * Priority override levels for roadmap features.
731
+ * When present, priority replaces positional ordering as the primary sort key.
732
+ */
733
+ type Priority = 'P0' | 'P1' | 'P2' | 'P3';
666
734
  /**
667
735
  * A feature entry in the project roadmap.
668
736
  */
@@ -679,6 +747,12 @@ interface RoadmapFeature {
679
747
  blockedBy: string[];
680
748
  /** One-line summary */
681
749
  summary: string;
750
+ /** GitHub username, email, or display name — null if unassigned */
751
+ assignee: string | null;
752
+ /** Optional priority override — null uses positional ordering */
753
+ priority: Priority | null;
754
+ /** External tracker ID (e.g., "github:owner/repo#42") — null if not synced */
755
+ externalId: string | null;
682
756
  }
683
757
  /**
684
758
  * A milestone grouping in the roadmap. The special "Backlog" milestone
@@ -692,6 +766,20 @@ interface RoadmapMilestone {
692
766
  /** Features in this milestone, in document order */
693
767
  features: RoadmapFeature[];
694
768
  }
769
+ /**
770
+ * A single record in the assignment history log.
771
+ * Reassignment produces two records: 'unassigned' for previous, 'assigned' for new.
772
+ */
773
+ interface AssignmentRecord {
774
+ /** Feature name */
775
+ feature: string;
776
+ /** Assignee identifier (username, email, or display name) */
777
+ assignee: string;
778
+ /** What happened */
779
+ action: 'assigned' | 'completed' | 'unassigned';
780
+ /** ISO date string (YYYY-MM-DD) */
781
+ date: string;
782
+ }
695
783
  /**
696
784
  * YAML frontmatter of the roadmap file.
697
785
  */
@@ -717,6 +805,8 @@ interface Roadmap {
717
805
  frontmatter: RoadmapFrontmatter;
718
806
  /** Milestones in document order (including Backlog) */
719
807
  milestones: RoadmapMilestone[];
808
+ /** Assignment history records, in document order */
809
+ assignmentHistory: AssignmentRecord[];
720
810
  }
721
811
 
722
- export { type AgentBackend, type AgentConfig, type AgentError, type AgentErrorCategory, type AgentEvent, type AgentSession, type BlockerRef, type CICheckIssue, type CICheckName, type CICheckOptions, type CICheckReport, type CICheckResult, type CICheckStatus, type CICheckSummary, type CIFailOnSeverity, type CIInitOptions, type CIPlatform, type CognitiveMode, type DailyUsage, Err, type FeatureStatus, type HooksConfig, type Issue, type IssueTrackerClient, type ModelPricing, Ok, type PollingConfig, type Result, type Roadmap, type RoadmapFeature, type RoadmapFrontmatter, type RoadmapMilestone, SESSION_SECTION_NAMES, STANDARD_COGNITIVE_MODES, type ServerConfig, type SessionEntry, type SessionEntryStatus, type SessionSectionName, type SessionSections, type SessionStartParams, type SessionUsage, type SkillContext, type SkillError, type SkillLifecycleHooks, type SkillMetadata, type SkillResult, type StepOutcome, type TokenUsage, type TrackerConfig, type TurnContext, type TurnParams, type TurnResult, type UsageRecord, type Workflow, type WorkflowConfig, type WorkflowDefinition, type WorkflowResult, type WorkflowStep, type WorkflowStepResult, type WorkspaceConfig, isErr, isOk };
812
+ export { type AgentBackend, type AgentConfig, type AgentError, type AgentErrorCategory, type AgentEvent, type AgentSession, type AssignmentRecord, type BlockerRef, type CICheckIssue, type CICheckName, type CICheckOptions, type CICheckReport, type CICheckResult, type CICheckStatus, type CICheckSummary, type CIFailOnSeverity, type CIInitOptions, type CIPlatform, type CognitiveMode, type DailyUsage, Err, type ExternalTicket, type ExternalTicketState, type FeatureStatus, type HooksConfig, type Issue, type IssueTrackerClient, type ModelPricing, Ok, type PollingConfig, type Priority, type Result, type Roadmap, type RoadmapFeature, type RoadmapFrontmatter, type RoadmapMilestone, SESSION_SECTION_NAMES, STANDARD_COGNITIVE_MODES, type ServerConfig, type SessionEntry, type SessionEntryStatus, type SessionSectionName, type SessionSections, type SessionStartParams, type SessionUsage, type SkillContext, type SkillError, type SkillLifecycleHooks, type SkillMetadata, type SkillResult, type StepOutcome, type SyncResult, type TokenUsage, type TrackerConfig, type TrackerSyncConfig, type TurnContext, type TurnParams, type TurnResult, type UsageRecord, type Workflow, type WorkflowConfig, type WorkflowDefinition, type WorkflowResult, type WorkflowStep, type WorkflowStepResult, type WorkspaceConfig, isErr, isOk };
package/dist/index.d.ts CHANGED
@@ -1,3 +1,66 @@
1
+ /**
2
+ * Represents a ticket created in an external tracking service.
3
+ */
4
+ interface ExternalTicket {
5
+ /** External identifier, e.g., "github:owner/repo#42" */
6
+ externalId: string;
7
+ /** URL to the ticket in the external service */
8
+ url: string;
9
+ }
10
+ /**
11
+ * Current state of a ticket in the external service.
12
+ * Pulled during syncFromExternal.
13
+ */
14
+ interface ExternalTicketState {
15
+ /** External identifier */
16
+ externalId: string;
17
+ /** External status (e.g., "open", "closed") */
18
+ status: string;
19
+ /** External labels (used for status disambiguation on GitHub) */
20
+ labels: string[];
21
+ /** Current assignee in the external service, or null */
22
+ assignee: string | null;
23
+ }
24
+ /**
25
+ * Result of a sync operation. Collects successes and errors per-feature.
26
+ */
27
+ interface SyncResult {
28
+ /** Tickets created during this sync */
29
+ created: ExternalTicket[];
30
+ /** External IDs of tickets that were updated */
31
+ updated: string[];
32
+ /** Assignment changes detected during pull */
33
+ assignmentChanges: Array<{
34
+ feature: string;
35
+ from: string | null;
36
+ to: string | null;
37
+ }>;
38
+ /** Per-feature errors (sync never throws) */
39
+ errors: Array<{
40
+ featureOrId: string;
41
+ error: Error;
42
+ }>;
43
+ }
44
+ /**
45
+ * Configuration for external tracker sync.
46
+ */
47
+ interface TrackerSyncConfig {
48
+ /** Adapter kind -- narrowed to GitHub-only for now */
49
+ kind: 'github';
50
+ /** Repository in "owner/repo" format (for GitHub) */
51
+ repo?: string;
52
+ /** Labels auto-applied to created tickets for filtering + identification */
53
+ labels?: string[];
54
+ /** Maps roadmap status -> external status string */
55
+ statusMap: Record<FeatureStatus, string>;
56
+ /**
57
+ * Maps external status (+ optional label) -> roadmap status.
58
+ * Compound keys like "open:in-progress" express state + label.
59
+ * Optional — when absent, syncFromExternal preserves current roadmap status.
60
+ */
61
+ reverseStatusMap?: Record<string, FeatureStatus>;
62
+ }
63
+
1
64
  /**
2
65
  * Token usage statistics for an agent turn or session.
3
66
  */
@@ -663,6 +726,11 @@ interface SkillLifecycleHooks {
663
726
  * Valid statuses for a roadmap feature.
664
727
  */
665
728
  type FeatureStatus = 'backlog' | 'planned' | 'in-progress' | 'done' | 'blocked';
729
+ /**
730
+ * Priority override levels for roadmap features.
731
+ * When present, priority replaces positional ordering as the primary sort key.
732
+ */
733
+ type Priority = 'P0' | 'P1' | 'P2' | 'P3';
666
734
  /**
667
735
  * A feature entry in the project roadmap.
668
736
  */
@@ -679,6 +747,12 @@ interface RoadmapFeature {
679
747
  blockedBy: string[];
680
748
  /** One-line summary */
681
749
  summary: string;
750
+ /** GitHub username, email, or display name — null if unassigned */
751
+ assignee: string | null;
752
+ /** Optional priority override — null uses positional ordering */
753
+ priority: Priority | null;
754
+ /** External tracker ID (e.g., "github:owner/repo#42") — null if not synced */
755
+ externalId: string | null;
682
756
  }
683
757
  /**
684
758
  * A milestone grouping in the roadmap. The special "Backlog" milestone
@@ -692,6 +766,20 @@ interface RoadmapMilestone {
692
766
  /** Features in this milestone, in document order */
693
767
  features: RoadmapFeature[];
694
768
  }
769
+ /**
770
+ * A single record in the assignment history log.
771
+ * Reassignment produces two records: 'unassigned' for previous, 'assigned' for new.
772
+ */
773
+ interface AssignmentRecord {
774
+ /** Feature name */
775
+ feature: string;
776
+ /** Assignee identifier (username, email, or display name) */
777
+ assignee: string;
778
+ /** What happened */
779
+ action: 'assigned' | 'completed' | 'unassigned';
780
+ /** ISO date string (YYYY-MM-DD) */
781
+ date: string;
782
+ }
695
783
  /**
696
784
  * YAML frontmatter of the roadmap file.
697
785
  */
@@ -717,6 +805,8 @@ interface Roadmap {
717
805
  frontmatter: RoadmapFrontmatter;
718
806
  /** Milestones in document order (including Backlog) */
719
807
  milestones: RoadmapMilestone[];
808
+ /** Assignment history records, in document order */
809
+ assignmentHistory: AssignmentRecord[];
720
810
  }
721
811
 
722
- export { type AgentBackend, type AgentConfig, type AgentError, type AgentErrorCategory, type AgentEvent, type AgentSession, type BlockerRef, type CICheckIssue, type CICheckName, type CICheckOptions, type CICheckReport, type CICheckResult, type CICheckStatus, type CICheckSummary, type CIFailOnSeverity, type CIInitOptions, type CIPlatform, type CognitiveMode, type DailyUsage, Err, type FeatureStatus, type HooksConfig, type Issue, type IssueTrackerClient, type ModelPricing, Ok, type PollingConfig, type Result, type Roadmap, type RoadmapFeature, type RoadmapFrontmatter, type RoadmapMilestone, SESSION_SECTION_NAMES, STANDARD_COGNITIVE_MODES, type ServerConfig, type SessionEntry, type SessionEntryStatus, type SessionSectionName, type SessionSections, type SessionStartParams, type SessionUsage, type SkillContext, type SkillError, type SkillLifecycleHooks, type SkillMetadata, type SkillResult, type StepOutcome, type TokenUsage, type TrackerConfig, type TurnContext, type TurnParams, type TurnResult, type UsageRecord, type Workflow, type WorkflowConfig, type WorkflowDefinition, type WorkflowResult, type WorkflowStep, type WorkflowStepResult, type WorkspaceConfig, isErr, isOk };
812
+ export { type AgentBackend, type AgentConfig, type AgentError, type AgentErrorCategory, type AgentEvent, type AgentSession, type AssignmentRecord, type BlockerRef, type CICheckIssue, type CICheckName, type CICheckOptions, type CICheckReport, type CICheckResult, type CICheckStatus, type CICheckSummary, type CIFailOnSeverity, type CIInitOptions, type CIPlatform, type CognitiveMode, type DailyUsage, Err, type ExternalTicket, type ExternalTicketState, type FeatureStatus, type HooksConfig, type Issue, type IssueTrackerClient, type ModelPricing, Ok, type PollingConfig, type Priority, type Result, type Roadmap, type RoadmapFeature, type RoadmapFrontmatter, type RoadmapMilestone, SESSION_SECTION_NAMES, STANDARD_COGNITIVE_MODES, type ServerConfig, type SessionEntry, type SessionEntryStatus, type SessionSectionName, type SessionSections, type SessionStartParams, type SessionUsage, type SkillContext, type SkillError, type SkillLifecycleHooks, type SkillMetadata, type SkillResult, type StepOutcome, type SyncResult, type TokenUsage, type TrackerConfig, type TrackerSyncConfig, type TurnContext, type TurnParams, type TurnResult, type UsageRecord, type Workflow, type WorkflowConfig, type WorkflowDefinition, type WorkflowResult, type WorkflowStep, type WorkflowStepResult, type WorkspaceConfig, isErr, isOk };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harness-engineering/types",
3
- "version": "0.6.0",
3
+ "version": "0.8.0",
4
4
  "description": "TypeScript types and interfaces for Harness Engineering",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -37,9 +37,9 @@
37
37
  },
38
38
  "homepage": "https://github.com/Intense-Visions/harness-engineering/tree/main/packages/types#readme",
39
39
  "devDependencies": {
40
- "@vitest/coverage-v8": "^4.0.18",
41
- "tsup": "^8.0.0",
42
- "vitest": "^4.0.18"
40
+ "@vitest/coverage-v8": "^4.1.2",
41
+ "tsup": "^8.5.1",
42
+ "vitest": "^4.1.2"
43
43
  },
44
44
  "scripts": {
45
45
  "build": "tsup src/index.ts --format cjs,esm --dts --tsconfig tsconfig.build.json",