@harness-engineering/types 0.3.0 → 0.4.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,53 @@
1
+ /**
2
+ * Session-scoped accumulative state types.
3
+ *
4
+ * Session memory allows skills to append to shared sections (terminology,
5
+ * decisions, constraints, risks, openQuestions, evidence) rather than
6
+ * overwriting. Each entry is timestamped and tagged with the authoring skill.
7
+ *
8
+ * @see docs/changes/ai-foundations-integration/proposal.md
9
+ */
10
+ /**
11
+ * Names of accumulative session sections.
12
+ * Runtime array used for iteration and validation.
13
+ */
14
+ declare const SESSION_SECTION_NAMES: readonly ["terminology", "decisions", "constraints", "risks", "openQuestions", "evidence"];
15
+ /**
16
+ * Union type of valid session section names.
17
+ */
18
+ type SessionSectionName = (typeof SESSION_SECTION_NAMES)[number];
19
+ /**
20
+ * Lifecycle status of a session entry.
21
+ * - `active` — current and relevant
22
+ * - `resolved` — addressed or answered (e.g., an open question that was resolved)
23
+ * - `superseded` — replaced by a newer entry
24
+ */
25
+ type SessionEntryStatus = 'active' | 'resolved' | 'superseded';
26
+ /**
27
+ * A single entry in a session section.
28
+ * Entries are append-only; skills mark them as `resolved` or `superseded`
29
+ * rather than deleting.
30
+ */
31
+ interface SessionEntry {
32
+ /** Auto-generated unique identifier */
33
+ id: string;
34
+ /** ISO 8601 timestamp of when the entry was created */
35
+ timestamp: string;
36
+ /** Name of the skill that authored this entry */
37
+ authorSkill: string;
38
+ /** The entry content (free-form text) */
39
+ content: string;
40
+ /** Lifecycle status of the entry */
41
+ status: SessionEntryStatus;
42
+ }
43
+ /**
44
+ * Container mapping each section name to its array of entries.
45
+ * Used as the shape of session-scoped state in `state.json`.
46
+ */
47
+ type SessionSections = {
48
+ [K in SessionSectionName]: SessionEntry[];
49
+ };
50
+
1
51
  /**
2
52
  * Token usage statistics for an agent turn or session.
3
53
  */
@@ -574,6 +624,10 @@ interface RoadmapFrontmatter {
574
624
  project: string;
575
625
  /** Schema version (currently 1) */
576
626
  version: number;
627
+ /** ISO date when roadmap was created */
628
+ created?: string;
629
+ /** ISO date when roadmap was last updated */
630
+ updated?: string;
577
631
  /** ISO timestamp of last automated sync */
578
632
  lastSynced: string;
579
633
  /** ISO timestamp of last manual edit */
@@ -589,4 +643,4 @@ interface Roadmap {
589
643
  milestones: RoadmapMilestone[];
590
644
  }
591
645
 
592
- 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, Err, type FeatureStatus, type HooksConfig, type Issue, type IssueTrackerClient, Ok, type PollingConfig, type Result, type Roadmap, type RoadmapFeature, type RoadmapFrontmatter, type RoadmapMilestone, STANDARD_COGNITIVE_MODES, type ServerConfig, type SessionStartParams, type SkillContext, type SkillError, type SkillLifecycleHooks, type SkillMetadata, type SkillResult, type StepOutcome, type TokenUsage, type TrackerConfig, type TurnContext, type TurnParams, type TurnResult, type Workflow, type WorkflowConfig, type WorkflowDefinition, type WorkflowResult, type WorkflowStep, type WorkflowStepResult, type WorkspaceConfig, isErr, isOk };
646
+ 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, Err, type FeatureStatus, type HooksConfig, type Issue, type IssueTrackerClient, 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 SkillContext, type SkillError, type SkillLifecycleHooks, type SkillMetadata, type SkillResult, type StepOutcome, type TokenUsage, type TrackerConfig, type TurnContext, type TurnParams, type TurnResult, 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,53 @@
1
+ /**
2
+ * Session-scoped accumulative state types.
3
+ *
4
+ * Session memory allows skills to append to shared sections (terminology,
5
+ * decisions, constraints, risks, openQuestions, evidence) rather than
6
+ * overwriting. Each entry is timestamped and tagged with the authoring skill.
7
+ *
8
+ * @see docs/changes/ai-foundations-integration/proposal.md
9
+ */
10
+ /**
11
+ * Names of accumulative session sections.
12
+ * Runtime array used for iteration and validation.
13
+ */
14
+ declare const SESSION_SECTION_NAMES: readonly ["terminology", "decisions", "constraints", "risks", "openQuestions", "evidence"];
15
+ /**
16
+ * Union type of valid session section names.
17
+ */
18
+ type SessionSectionName = (typeof SESSION_SECTION_NAMES)[number];
19
+ /**
20
+ * Lifecycle status of a session entry.
21
+ * - `active` — current and relevant
22
+ * - `resolved` — addressed or answered (e.g., an open question that was resolved)
23
+ * - `superseded` — replaced by a newer entry
24
+ */
25
+ type SessionEntryStatus = 'active' | 'resolved' | 'superseded';
26
+ /**
27
+ * A single entry in a session section.
28
+ * Entries are append-only; skills mark them as `resolved` or `superseded`
29
+ * rather than deleting.
30
+ */
31
+ interface SessionEntry {
32
+ /** Auto-generated unique identifier */
33
+ id: string;
34
+ /** ISO 8601 timestamp of when the entry was created */
35
+ timestamp: string;
36
+ /** Name of the skill that authored this entry */
37
+ authorSkill: string;
38
+ /** The entry content (free-form text) */
39
+ content: string;
40
+ /** Lifecycle status of the entry */
41
+ status: SessionEntryStatus;
42
+ }
43
+ /**
44
+ * Container mapping each section name to its array of entries.
45
+ * Used as the shape of session-scoped state in `state.json`.
46
+ */
47
+ type SessionSections = {
48
+ [K in SessionSectionName]: SessionEntry[];
49
+ };
50
+
1
51
  /**
2
52
  * Token usage statistics for an agent turn or session.
3
53
  */
@@ -574,6 +624,10 @@ interface RoadmapFrontmatter {
574
624
  project: string;
575
625
  /** Schema version (currently 1) */
576
626
  version: number;
627
+ /** ISO date when roadmap was created */
628
+ created?: string;
629
+ /** ISO date when roadmap was last updated */
630
+ updated?: string;
577
631
  /** ISO timestamp of last automated sync */
578
632
  lastSynced: string;
579
633
  /** ISO timestamp of last manual edit */
@@ -589,4 +643,4 @@ interface Roadmap {
589
643
  milestones: RoadmapMilestone[];
590
644
  }
591
645
 
592
- 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, Err, type FeatureStatus, type HooksConfig, type Issue, type IssueTrackerClient, Ok, type PollingConfig, type Result, type Roadmap, type RoadmapFeature, type RoadmapFrontmatter, type RoadmapMilestone, STANDARD_COGNITIVE_MODES, type ServerConfig, type SessionStartParams, type SkillContext, type SkillError, type SkillLifecycleHooks, type SkillMetadata, type SkillResult, type StepOutcome, type TokenUsage, type TrackerConfig, type TurnContext, type TurnParams, type TurnResult, type Workflow, type WorkflowConfig, type WorkflowDefinition, type WorkflowResult, type WorkflowStep, type WorkflowStepResult, type WorkspaceConfig, isErr, isOk };
646
+ 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, Err, type FeatureStatus, type HooksConfig, type Issue, type IssueTrackerClient, 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 SkillContext, type SkillError, type SkillLifecycleHooks, type SkillMetadata, type SkillResult, type StepOutcome, type TokenUsage, type TrackerConfig, type TurnContext, type TurnParams, type TurnResult, type Workflow, type WorkflowConfig, type WorkflowDefinition, type WorkflowResult, type WorkflowStep, type WorkflowStepResult, type WorkspaceConfig, isErr, isOk };
package/dist/index.js CHANGED
@@ -22,11 +22,24 @@ var index_exports = {};
22
22
  __export(index_exports, {
23
23
  Err: () => Err,
24
24
  Ok: () => Ok,
25
+ SESSION_SECTION_NAMES: () => SESSION_SECTION_NAMES,
25
26
  STANDARD_COGNITIVE_MODES: () => STANDARD_COGNITIVE_MODES,
26
27
  isErr: () => isErr,
27
28
  isOk: () => isOk
28
29
  });
29
30
  module.exports = __toCommonJS(index_exports);
31
+
32
+ // src/session-state.ts
33
+ var SESSION_SECTION_NAMES = [
34
+ "terminology",
35
+ "decisions",
36
+ "constraints",
37
+ "risks",
38
+ "openQuestions",
39
+ "evidence"
40
+ ];
41
+
42
+ // src/index.ts
30
43
  function Ok(value) {
31
44
  return { ok: true, value };
32
45
  }
@@ -51,6 +64,7 @@ var STANDARD_COGNITIVE_MODES = [
51
64
  0 && (module.exports = {
52
65
  Err,
53
66
  Ok,
67
+ SESSION_SECTION_NAMES,
54
68
  STANDARD_COGNITIVE_MODES,
55
69
  isErr,
56
70
  isOk
package/dist/index.mjs CHANGED
@@ -1,3 +1,13 @@
1
+ // src/session-state.ts
2
+ var SESSION_SECTION_NAMES = [
3
+ "terminology",
4
+ "decisions",
5
+ "constraints",
6
+ "risks",
7
+ "openQuestions",
8
+ "evidence"
9
+ ];
10
+
1
11
  // src/index.ts
2
12
  function Ok(value) {
3
13
  return { ok: true, value };
@@ -22,6 +32,7 @@ var STANDARD_COGNITIVE_MODES = [
22
32
  export {
23
33
  Err,
24
34
  Ok,
35
+ SESSION_SECTION_NAMES,
25
36
  STANDARD_COGNITIVE_MODES,
26
37
  isErr,
27
38
  isOk
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harness-engineering/types",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "description": "TypeScript types and interfaces for Harness Engineering",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",