@danypops/papyrus 0.57.0 → 0.57.1

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/papyrus",
3
- "version": "0.57.0",
3
+ "version": "0.57.1",
4
4
  "description": "Daemon-backed graph artifacts, evidence-bearing tasks, rules, skills, and native TUI workflows for Pi",
5
5
  "type": "module",
6
6
  "main": "./src/index.ts",
@@ -10,8 +10,8 @@
10
10
  import { VehicleError } from "@danypops/vehicle-core";
11
11
  import { PlaybookCompositionError } from "../playbook/playbook-definition.ts";
12
12
  import { InvalidSessionSecretError } from "../session-identity/session-identity-service.ts";
13
+ import { TaskCreateIdempotencyConflictError } from "../task/create-request/task-create-request-store.ts";
13
14
  import { TaskDependencyCycleError, TaskExecutionBoundExceededError } from "../task/task-execution.ts";
14
- import { TaskCreateIdempotencyConflictError } from "../task-create-request/task-create-request-store.ts";
15
15
 
16
16
  /**
17
17
  * tasks.focus/pause/unpause/clear_focus and playbooks.invoke all re-run
@@ -27,6 +27,7 @@ import { GATE_TYPES } from "../gate/gate.ts";
27
27
  import { tasksOperations } from "../modules/tasks.ts";
28
28
  import type { SessionIdentity } from "../session-identity/session-identity-service.ts";
29
29
  import { PROOF_TYPES } from "../task/checklist.ts";
30
+ import { TaskMutationIdempotencyConflictError, TaskMutationPendingError } from "../task/mutation-request/task-mutation-request-store.ts";
30
31
  import type { TaskExecutionPlan } from "../task/task-execution.ts";
31
32
  import {
32
33
  type TaskCompletion,
@@ -36,7 +37,6 @@ import {
36
37
  TaskProjectNotFoundError,
37
38
  type Tasks,
38
39
  } from "../task/task-service.ts";
39
- import { TaskMutationIdempotencyConflictError, TaskMutationPendingError } from "../task-mutation-request/task-mutation-request-store.ts";
40
40
  import type { TaskViewMode } from "../task-scope/task-scope.ts";
41
41
  import {
42
42
  booleanProp,
package/src/index.ts CHANGED
@@ -28,6 +28,7 @@ export type { PlaybookInvocationResult, PlaybookMissingArguments } from "./playb
28
28
  export type { WorkflowRunResult } from "./playbook/workflow-execution.ts";
29
29
  export type { OperationName, SchemaState } from "./service.ts";
30
30
  export { checklistEntries, PROOF_TYPES, type ProofReference } from "./task/checklist.ts";
31
+ export type { TaskLease, TaskLeaseView } from "./task/lease/task-lease.ts";
31
32
  export { taskContext } from "./task/task-context.ts";
32
33
  export { projectTaskExecution, type TaskExecutionPlan, type TaskExecutionState } from "./task/task-execution.ts";
33
34
  export { projectTaskGraph, type TaskGraphView } from "./task/task-graph-view.ts";
@@ -42,5 +43,4 @@ export type {
42
43
  } from "./task/task-service.ts";
43
44
  export { TaskInvalidTransitionError, TaskMutationReceiptNotFoundError } from "./task/task-service.ts";
44
45
  export type { TaskEvent, TaskHistoryPage } from "./task-event/task-event.ts";
45
- export type { TaskLease, TaskLeaseView } from "./task-lease/task-lease.ts";
46
46
  export type { TaskViewSelection } from "./task-scope/task-scope.ts";
package/src/service.ts CHANGED
@@ -43,14 +43,14 @@ import { listInjectableRules } from "./rules/rules-service.ts";
43
43
  import { SQLiteScopeGroupStore } from "./scope-group/sqlite-scope-group-store.ts";
44
44
  import { InvalidSessionSecretError, SessionIdentity } from "./session-identity/session-identity-service.ts";
45
45
  import { SQLiteSessionIdentityStore } from "./session-identity/sqlite-session-identity-store.ts";
46
+ import { SQLiteTaskCreateRequestStore } from "./task/create-request/sqlite-task-create-request-store.ts";
47
+ import { SQLiteTaskFocusStore } from "./task/focus/sqlite-task-focus-store.ts";
48
+ import { SQLiteTaskLeaseStore } from "./task/lease/sqlite-task-lease-store.ts";
49
+ import { SQLiteTaskMutationRequestStore } from "./task/mutation-request/sqlite-task-mutation-request-store.ts";
46
50
  import { type TaskStatus, Tasks } from "./task/task-service.ts";
47
- import { SQLiteTaskCreateRequestStore } from "./task-create-request/sqlite-task-create-request-store.ts";
48
51
  import { SQLiteTaskEventStore } from "./task-event/sqlite-task-event-store.ts";
49
52
  import type { TaskEventContext } from "./task-event/task-event.ts";
50
53
  import type { TaskEventStore } from "./task-event/task-event-store.ts";
51
- import { SQLiteTaskFocusStore } from "./task-focus/sqlite-task-focus-store.ts";
52
- import { SQLiteTaskLeaseStore } from "./task-lease/sqlite-task-lease-store.ts";
53
- import { SQLiteTaskMutationRequestStore } from "./task-mutation-request/sqlite-task-mutation-request-store.ts";
54
54
  import { SQLiteTaskScopeStore } from "./task-scope/sqlite-task-scope-store.ts";
55
55
  import type { TaskViewMode } from "./task-scope/task-scope.ts";
56
56
  import type { TaskScopeStore } from "./task-scope/task-scope-store.ts";
@@ -1,5 +1,5 @@
1
- import type { Db } from "../db.ts";
2
- import type { TaskCreateRequestRecord, TaskCreateRequestStore } from "../task-create-request/task-create-request-store.ts";
1
+ import type { Db } from "../../db.ts";
2
+ import type { TaskCreateRequestRecord, TaskCreateRequestStore } from "./task-create-request-store.ts";
3
3
 
4
4
  export class SQLiteTaskCreateRequestStore implements TaskCreateRequestStore {
5
5
  constructor(private readonly db: Db) {}
@@ -1,7 +1,7 @@
1
- import { TASK_FOCUS_MAX_SCOPES } from "../constants.ts";
2
- import type { Db } from "../db.ts";
3
- import { inTransaction } from "../db.ts";
4
- import { normalizeFocusScope, type TaskFocusState, type TaskFocusStatus, type TaskFocusStore } from "../task-focus/task-focus-store.ts";
1
+ import { TASK_FOCUS_MAX_SCOPES } from "../../constants.ts";
2
+ import type { Db } from "../../db.ts";
3
+ import { inTransaction } from "../../db.ts";
4
+ import { normalizeFocusScope, type TaskFocusState, type TaskFocusStatus, type TaskFocusStore } from "./task-focus-store.ts";
5
5
 
6
6
  export class SQLiteTaskFocusStore implements TaskFocusStore {
7
7
  constructor(private readonly db: Db) {}
@@ -1,4 +1,4 @@
1
- import { TASK_FOCUS_DEFAULT_SCOPE, TASK_FOCUS_MAX_SCOPES, TASK_FOCUS_SCOPE_MAX_LENGTH } from "../constants.ts";
1
+ import { TASK_FOCUS_DEFAULT_SCOPE, TASK_FOCUS_MAX_SCOPES, TASK_FOCUS_SCOPE_MAX_LENGTH } from "../../constants.ts";
2
2
 
3
3
  export type TaskFocusStatus = "active" | "paused";
4
4
 
@@ -1,8 +1,8 @@
1
- import { TASK_LEASE_DEFAULT_TTL_MS } from "../constants.ts";
2
- import type { Db } from "../db.ts";
3
- import { inTransaction } from "../db.ts";
4
- import { isLeaseExpired, type TaskLease, validateLeaseNote, validateLeaseOwner, validateLeaseTtlMs } from "../task-lease/task-lease.ts";
5
- import type { TaskLeaseStore } from "../task-lease/task-lease-store.ts";
1
+ import { TASK_LEASE_DEFAULT_TTL_MS } from "../../constants.ts";
2
+ import type { Db } from "../../db.ts";
3
+ import { inTransaction } from "../../db.ts";
4
+ import { isLeaseExpired, type TaskLease, validateLeaseNote, validateLeaseOwner, validateLeaseTtlMs } from "./task-lease.ts";
5
+ import type { TaskLeaseStore } from "./task-lease-store.ts";
6
6
 
7
7
  interface TaskLeaseRow {
8
8
  task_id: string;
@@ -1,5 +1,5 @@
1
- import { TASK_LEASE_DEFAULT_TTL_MS } from "../constants.ts";
2
- import { isLeaseExpired, type TaskLease, validateLeaseNote, validateLeaseOwner, validateLeaseTtlMs } from "../task-lease/task-lease.ts";
1
+ import { TASK_LEASE_DEFAULT_TTL_MS } from "../../constants.ts";
2
+ import { isLeaseExpired, type TaskLease, validateLeaseNote, validateLeaseOwner, validateLeaseTtlMs } from "./task-lease.ts";
3
3
 
4
4
  export interface TaskLeaseStore {
5
5
  /**
@@ -1,4 +1,4 @@
1
- import { TASK_LEASE_MAX_TTL_MS, TASK_LEASE_MIN_TTL_MS, TASK_LEASE_NOTE_MAX_LENGTH, TASK_LEASE_OWNER_MAX_LENGTH } from "../constants.ts";
1
+ import { TASK_LEASE_MAX_TTL_MS, TASK_LEASE_MIN_TTL_MS, TASK_LEASE_NOTE_MAX_LENGTH, TASK_LEASE_OWNER_MAX_LENGTH } from "../../constants.ts";
2
2
 
3
3
  /**
4
4
  * A bounded work reservation on a Task, independent of both the Task's own lifecycle status
@@ -1,9 +1,5 @@
1
- import type { Db } from "../db.ts";
2
- import {
3
- TaskMutationPendingError,
4
- type TaskMutationRequestRecord,
5
- type TaskMutationRequestStore,
6
- } from "../task-mutation-request/task-mutation-request-store.ts";
1
+ import type { Db } from "../../db.ts";
2
+ import { TaskMutationPendingError, type TaskMutationRequestRecord, type TaskMutationRequestStore } from "./task-mutation-request-store.ts";
7
3
 
8
4
  interface TaskMutationRequestRow {
9
5
  request_scope: string;
@@ -3,7 +3,7 @@ import type { ArtifactStore } from "../artifact/artifact-store.ts";
3
3
  import { TASK_FOCUS_STALE_AFTER_MS } from "../constants.ts";
4
4
  import { type AppendTaskEvent, type TaskEventContext, validateEventContext } from "../task-event/task-event.ts";
5
5
  import type { TaskEventStore } from "../task-event/task-event-store.ts";
6
- import type { TaskFocusStatus, TaskFocusStore } from "../task-focus/task-focus-store.ts";
6
+ import type { TaskFocusStatus, TaskFocusStore } from "./focus/task-focus-store.ts";
7
7
  import { TaskInvalidTransitionError } from "./task-lifecycle-errors.ts";
8
8
  import type { TaskMutationCoordinator, TaskMutationRequestContext } from "./task-mutation-coordinator.ts";
9
9
  // Type-only import: erased entirely at compile time, so this does not create a real runtime
@@ -1,6 +1,6 @@
1
1
  import type { Artifact } from "../artifact/artifact.ts";
2
- import type { TaskLease, TaskLeaseView } from "../task-lease/task-lease.ts";
3
- import type { TaskLeaseStore } from "../task-lease/task-lease-store.ts";
2
+ import type { TaskLease, TaskLeaseView } from "./lease/task-lease.ts";
3
+ import type { TaskLeaseStore } from "./lease/task-lease-store.ts";
4
4
 
5
5
  /**
6
6
  * Task lease management (claim/heartbeat/release/get/reap), split out of the Tasks god class as
@@ -6,7 +6,7 @@ import {
6
6
  TaskMutationPendingError,
7
7
  type TaskMutationRequestRecord,
8
8
  type TaskMutationRequestStore,
9
- } from "../task-mutation-request/task-mutation-request-store.ts";
9
+ } from "./mutation-request/task-mutation-request-store.ts";
10
10
 
11
11
  export class TaskMutationReceiptNotFoundError extends Error {}
12
12
 
@@ -18,11 +18,6 @@ import { DISCUSSION_SUBTYPE, isDiscussionArtifact, readDiscussionExtra } from ".
18
18
  import type { TransitionTable } from "../domain-service-shared.ts";
19
19
  import { type Gate, type GateResult, validateGates } from "../gate/gate.ts";
20
20
  import type { GateRunner } from "../gate/gate-runner.ts";
21
- import {
22
- InMemoryTaskCreateRequestStore,
23
- TaskCreateIdempotencyConflictError,
24
- type TaskCreateRequestStore,
25
- } from "../task-create-request/task-create-request-store.ts";
26
21
  import type {
27
22
  AppendTaskEvent,
28
23
  TaskEventContext,
@@ -34,15 +29,6 @@ import type {
34
29
  } from "../task-event/task-event.ts";
35
30
  import { validateEventContext } from "../task-event/task-event.ts";
36
31
  import { InMemoryTaskEventStore, type TaskEventStore } from "../task-event/task-event-store.ts";
37
- import { InMemoryTaskFocusStore, type TaskFocusStatus, type TaskFocusStore } from "../task-focus/task-focus-store.ts";
38
- import type { TaskLeaseView } from "../task-lease/task-lease.ts";
39
- import { InMemoryTaskLeaseStore, type TaskLeaseStore } from "../task-lease/task-lease-store.ts";
40
- import {
41
- InMemoryTaskMutationRequestStore,
42
- TaskMutationPendingError,
43
- type TaskMutationRequestRecord,
44
- type TaskMutationRequestStore,
45
- } from "../task-mutation-request/task-mutation-request-store.ts";
46
32
  import {
47
33
  normalizeProjectRoot,
48
34
  type RegisterTaskProjectInput,
@@ -54,6 +40,20 @@ import {
54
40
  } from "../task-scope/task-scope.ts";
55
41
  import { InMemoryTaskScopeStore, type TaskScopeStore } from "../task-scope/task-scope-store.ts";
56
42
  import { type Checklist, checklistEntries, type ProofReference, validateChecklist } from "./checklist.ts";
43
+ import {
44
+ InMemoryTaskCreateRequestStore,
45
+ TaskCreateIdempotencyConflictError,
46
+ type TaskCreateRequestStore,
47
+ } from "./create-request/task-create-request-store.ts";
48
+ import { InMemoryTaskFocusStore, type TaskFocusStatus, type TaskFocusStore } from "./focus/task-focus-store.ts";
49
+ import type { TaskLeaseView } from "./lease/task-lease.ts";
50
+ import { InMemoryTaskLeaseStore, type TaskLeaseStore } from "./lease/task-lease-store.ts";
51
+ import {
52
+ InMemoryTaskMutationRequestStore,
53
+ TaskMutationPendingError,
54
+ type TaskMutationRequestRecord,
55
+ type TaskMutationRequestStore,
56
+ } from "./mutation-request/task-mutation-request-store.ts";
57
57
  import { TaskEdges } from "./task-edges.ts";
58
58
  import { TaskExecutionBoundExceededError } from "./task-execution.ts";
59
59
  import { type TaskFocus, TaskFocusCoordinator, type TaskFocusMutationResult } from "./task-focus-coordinator.ts";