@danypops/papyrus 0.44.8 → 0.44.10
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 +3 -2
- package/src/{ports → artifact}/artifact-event-reader.ts +1 -1
- package/src/{artifact-relationship-view.ts → artifact/artifact-relationship-view.ts} +3 -3
- package/src/{ports → artifact}/artifact-store.ts +2 -2
- package/src/{artifact-subtree.ts → artifact/artifact-subtree.ts} +4 -4
- package/src/{ports → artifact}/artifact-trash-store.ts +2 -2
- package/src/{adapters → artifact}/sqlite-artifact-scope-store.ts +1 -1
- package/src/{adapters → artifact}/sqlite-artifact-store.ts +15 -15
- package/src/authority-registry.ts +3 -3
- package/src/cli/artifact-command.ts +210 -0
- package/src/cli/discuss-command.ts +256 -0
- package/src/cli/docs-command.ts +192 -0
- package/src/cli/gates-command.ts +46 -0
- package/src/cli/graph-command.ts +171 -0
- package/src/cli/graph-projection-command.ts +79 -0
- package/src/cli/log-command.ts +101 -0
- package/src/cli/migration-command.ts +40 -0
- package/src/cli/note-command.ts +186 -0
- package/src/cli/playbooks-command.ts +313 -0
- package/src/cli/rules-command.ts +220 -0
- package/src/cli/session-identity-command.ts +58 -0
- package/src/cli/shared.ts +5 -0
- package/src/cli/stricli-run.ts +30 -0
- package/src/cli/task-command.ts +892 -0
- package/src/cli.ts +32 -1914
- package/src/client.ts +2 -2
- package/src/{daemon-state.ts → daemon/daemon-state.ts} +1 -1
- package/src/{daemon.ts → daemon/daemon.ts} +3 -3
- package/src/db.ts +1 -1
- package/src/{discussion-service.ts → discussion/discussion-service.ts} +7 -6
- package/src/domain-services.ts +5 -5
- package/src/{graph-projection-service.ts → graph-projection/graph-projection-service.ts} +6 -6
- package/src/{vehicle/artifact-trash-vehicle.ts → handlers/artifact-trash.ts} +4 -4
- package/src/{vehicle/discuss-vehicle.ts → handlers/discuss.ts} +20 -25
- package/src/{vehicle/docs-vehicle.ts → handlers/docs.ts} +4 -37
- package/src/{vehicle/notes-vehicle.ts → handlers/notes.ts} +4 -38
- package/src/{vehicle/playbooks-vehicle.ts → handlers/playbooks.ts} +34 -100
- package/src/{vehicle/papyrus-vehicle.ts → handlers/registry.ts} +16 -16
- package/src/{vehicle/rules-vehicle.ts → handlers/rules.ts} +4 -37
- package/src/{vehicle/artifact-vehicle-shared.ts → handlers/shared.ts} +96 -6
- package/src/{vehicle/tasks-vehicle.ts → handlers/tasks.ts} +37 -124
- package/src/index.ts +13 -13
- package/src/{log-service.ts → log/log-service.ts} +2 -2
- package/src/modules/discuss.ts +7 -28
- package/src/modules/docs.ts +4 -24
- package/src/modules/graph-projection.ts +5 -11
- package/src/modules/logs.ts +2 -23
- package/src/modules/notes.ts +2 -23
- package/src/modules/operation-input.ts +35 -0
- package/src/modules/playbooks.ts +13 -33
- package/src/modules/rules.ts +4 -24
- package/src/modules/session-identity.ts +2 -16
- package/src/modules/tasks.ts +11 -38
- package/src/{note-service.ts → note/note-service.ts} +6 -6
- package/src/ops.ts +6 -6
- package/src/{playbook-definition.ts → playbook/playbook-definition.ts} +7 -6
- package/src/{playbook-execution.ts → playbook/playbook-execution.ts} +5 -4
- package/src/{workflow-execution.ts → playbook/workflow-execution.ts} +12 -12
- package/src/service.ts +30 -57
- package/src/{session-identity-service.ts → session-identity/session-identity-service.ts} +2 -2
- package/src/{ports → stores}/session-identity-store.ts +1 -1
- package/src/{adapters → stores}/sqlite-discussion-round-store.ts +1 -1
- package/src/{adapters → stores}/sqlite-gate-runner.ts +1 -1
- package/src/{adapters → stores}/sqlite-graph-projection-store.ts +1 -1
- package/src/{adapters → stores}/sqlite-log-store.ts +1 -1
- package/src/{adapters → stores}/sqlite-note-event-store.ts +1 -1
- package/src/{adapters → stores}/sqlite-session-identity-store.ts +1 -1
- package/src/{adapters → stores}/sqlite-task-event-store.ts +1 -1
- package/src/{adapters → stores}/sqlite-task-focus-store.ts +1 -1
- package/src/{adapters → stores}/sqlite-task-lease-store.ts +1 -1
- package/src/{adapters → stores}/sqlite-task-scope-store.ts +1 -1
- package/src/{task-context.ts → task/task-context.ts} +4 -4
- package/src/{task-execution.ts → task/task-execution.ts} +1 -1
- package/src/{task-graph-view.ts → task/task-graph-view.ts} +1 -1
- package/src/{task-relationship-view.ts → task/task-relationship-view.ts} +3 -3
- package/src/{task-service.ts → task/task-service.ts} +14 -14
- /package/src/{domain → artifact}/artifact-alias.ts +0 -0
- /package/src/{domain → artifact}/artifact-event.ts +0 -0
- /package/src/{ports → artifact}/artifact-scope-store.ts +0 -0
- /package/src/{domain → artifact}/artifact-trash.ts +0 -0
- /package/src/{domain → artifact}/artifact.ts +0 -0
- /package/src/{ports → artifact}/atomic-artifact-store.ts +0 -0
- /package/src/{log.ts → log/log.ts} +0 -0
- /package/src/{ports → stores}/discussion-round-store.ts +0 -0
- /package/src/{ports → stores}/gate-runner.ts +0 -0
- /package/src/{ports → stores}/graph-projection-store.ts +0 -0
- /package/src/{ports → stores}/graph-renderer.ts +0 -0
- /package/src/{ports → stores}/log-store.ts +0 -0
- /package/src/{ports → stores}/note-event-store.ts +0 -0
- /package/src/{ports → stores}/task-event-store.ts +0 -0
- /package/src/{ports → stores}/task-focus-store.ts +0 -0
- /package/src/{ports → stores}/task-lease-store.ts +0 -0
- /package/src/{ports → stores}/task-scope-store.ts +0 -0
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
normalizeNoteHistoryQuery,
|
|
9
9
|
validateNoteEvent,
|
|
10
10
|
} from "../domain/note-event.ts";
|
|
11
|
-
import type { NoteEventStore } from "
|
|
11
|
+
import type { NoteEventStore } from "./note-event-store.ts";
|
|
12
12
|
|
|
13
13
|
interface NoteEventRow {
|
|
14
14
|
id: number;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SESSION_IDENTITY_MAX_ROWS } from "../constants.ts";
|
|
2
2
|
import type { Db } from "../db.ts";
|
|
3
3
|
import { inTransaction } from "../db.ts";
|
|
4
|
-
import type { SessionIdentityRecord, SessionIdentityStore } from "
|
|
4
|
+
import type { SessionIdentityRecord, SessionIdentityStore } from "./session-identity-store.ts";
|
|
5
5
|
|
|
6
6
|
export class SQLiteSessionIdentityStore implements SessionIdentityStore {
|
|
7
7
|
constructor(private readonly db: Db) {}
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
type TaskLifecycleStatus,
|
|
15
15
|
validateTaskEvent,
|
|
16
16
|
} from "../domain/task-event.ts";
|
|
17
|
-
import type { TaskEventStore } from "
|
|
17
|
+
import type { TaskEventStore } from "./task-event-store.ts";
|
|
18
18
|
|
|
19
19
|
interface TaskEventRow {
|
|
20
20
|
id: number;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { TASK_FOCUS_MAX_SCOPES } from "../constants.ts";
|
|
2
2
|
import type { Db } from "../db.ts";
|
|
3
3
|
import { inTransaction } from "../db.ts";
|
|
4
|
-
import { normalizeFocusScope, type TaskFocusState, type TaskFocusStatus, type TaskFocusStore } from "
|
|
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) {}
|
|
@@ -2,7 +2,7 @@ import { TASK_LEASE_DEFAULT_TTL_MS } from "../constants.ts";
|
|
|
2
2
|
import type { Db } from "../db.ts";
|
|
3
3
|
import { inTransaction } from "../db.ts";
|
|
4
4
|
import { isLeaseExpired, type TaskLease, validateLeaseNote, validateLeaseOwner, validateLeaseTtlMs } from "../domain/task-lease.ts";
|
|
5
|
-
import type { TaskLeaseStore } from "
|
|
5
|
+
import type { TaskLeaseStore } from "./task-lease-store.ts";
|
|
6
6
|
|
|
7
7
|
interface TaskLeaseRow {
|
|
8
8
|
task_id: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Db } from "../db.ts";
|
|
2
2
|
import { inTransaction } from "../db.ts";
|
|
3
3
|
import type { TaskProjectScope, TaskScopeSource, TaskViewMode, TaskViewPreference } from "../domain/task-scope.ts";
|
|
4
|
-
import type { TaskScopeStore } from "
|
|
4
|
+
import type { TaskScopeStore } from "./task-scope-store.ts";
|
|
5
5
|
|
|
6
6
|
export class SQLiteTaskScopeStore implements TaskScopeStore {
|
|
7
7
|
constructor(private readonly db: Db) {}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
1
|
+
import type { Artifact } from "../artifact/artifact.ts";
|
|
2
|
+
import type { ArtifactStore } from "../artifact/artifact-store.ts";
|
|
3
|
+
import { TASK_CONTEXT_CURRENT_LIMIT, TASK_CONTEXT_REJECTED_LIMIT, TASK_RECONCILIATION_INSTRUCTION } from "../constants.ts";
|
|
4
|
+
import { DISCUSSION_SUBTYPE, readDiscussionExtra } from "../domain/discussion.ts";
|
|
5
5
|
|
|
6
6
|
interface Gate {
|
|
7
7
|
type?: unknown;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TASK_EXECUTION_MAX_DEGREE, TASK_EXECUTION_MAX_EDGES, TASK_EXECUTION_MAX_NODES } from "
|
|
1
|
+
import { TASK_EXECUTION_MAX_DEGREE, TASK_EXECUTION_MAX_EDGES, TASK_EXECUTION_MAX_NODES } from "../constants.ts";
|
|
2
2
|
import type { TaskGraph } from "./task-service.ts";
|
|
3
3
|
|
|
4
4
|
/** A task execution graph is too large or too densely connected to process safely -- a distinct class (not a plain Error) so the Vehicle adapter layer can classify it into a capacity-category failure instead of an opaque handler-failed. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { DisplayGraph, DisplayGraphEdge } from "
|
|
1
|
+
import type { DisplayGraph, DisplayGraphEdge } from "../domain/display-graph.ts";
|
|
2
2
|
import { projectTaskExecution, type TaskExecutionState } from "./task-execution.ts";
|
|
3
3
|
import type { TaskGraph } from "./task-service.ts";
|
|
4
4
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Artifact, ArtifactEdge } from "
|
|
2
|
-
import type { DisplayGraph, DisplayGraphEdge, DisplayGraphNode } from "
|
|
1
|
+
import type { Artifact, ArtifactEdge } from "../artifact/artifact.ts";
|
|
2
|
+
import type { DisplayGraph, DisplayGraphEdge, DisplayGraphNode } from "../domain/display-graph.ts";
|
|
3
3
|
import type { TaskGraph } from "./task-service.ts";
|
|
4
4
|
|
|
5
5
|
function normalizeEdge(edge: ArtifactEdge): DisplayGraphEdge {
|
|
@@ -9,7 +9,7 @@ function normalizeEdge(edge: ArtifactEdge): DisplayGraphEdge {
|
|
|
9
9
|
return { from: edge.from, to: edge.to, label: edge.relation };
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
/** Best-effort readable label from a bare id when no real title is known -- shared with artifact-relationship-view.ts's generic version of this same problem. */
|
|
12
|
+
/** Best-effort readable label from a bare id when no real title is known -- shared with artifact/artifact-relationship-view.ts's generic version of this same problem. */
|
|
13
13
|
export function fallbackLabel(id: string): string {
|
|
14
14
|
return id.replace(/-[a-z0-9]{4}$/i, "").replaceAll("-", " ");
|
|
15
15
|
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { Artifact } from "../artifact/artifact.ts";
|
|
2
|
+
import type { ArtifactStore } from "../artifact/artifact-store.ts";
|
|
1
3
|
import {
|
|
2
4
|
TASK_BODY_MAX_LENGTH,
|
|
3
5
|
TASK_CANCEL_SUBTREE_MAX_NODES,
|
|
@@ -9,11 +11,10 @@ import {
|
|
|
9
11
|
TASK_LABEL_MAX_LENGTH,
|
|
10
12
|
TASK_SCOPE_MAX_TASKS,
|
|
11
13
|
TASK_TITLE_MAX_LENGTH,
|
|
12
|
-
} from "
|
|
13
|
-
import type
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import { type Gate, type GateResult, validateGates } from "./domain/gate.ts";
|
|
14
|
+
} from "../constants.ts";
|
|
15
|
+
import { type Checklist, checklistEntries, type ProofReference, validateChecklist } from "../domain/checklist.ts";
|
|
16
|
+
import { DISCUSSION_SUBTYPE, isDiscussionArtifact, readDiscussionExtra } from "../domain/discussion.ts";
|
|
17
|
+
import { type Gate, type GateResult, validateGates } from "../domain/gate.ts";
|
|
17
18
|
import type {
|
|
18
19
|
AppendTaskEvent,
|
|
19
20
|
TaskEventContext,
|
|
@@ -22,21 +23,20 @@ import type {
|
|
|
22
23
|
TaskHistoryPage,
|
|
23
24
|
TaskHistoryQuery,
|
|
24
25
|
TaskLifecycleStatus,
|
|
25
|
-
} from "
|
|
26
|
-
import type { TaskLease } from "
|
|
26
|
+
} from "../domain/task-event.ts";
|
|
27
|
+
import type { TaskLease } from "../domain/task-lease.ts";
|
|
27
28
|
import {
|
|
28
29
|
normalizeProjectRoot,
|
|
29
30
|
type TaskScopeSource,
|
|
30
31
|
type TaskViewMode,
|
|
31
32
|
type TaskViewSelection,
|
|
32
33
|
taskScopeLabel,
|
|
33
|
-
} from "
|
|
34
|
-
import type {
|
|
35
|
-
import type
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import { InMemoryTaskScopeStore, type TaskScopeStore } from "./ports/task-scope-store.ts";
|
|
34
|
+
} from "../domain/task-scope.ts";
|
|
35
|
+
import type { GateRunner } from "../stores/gate-runner.ts";
|
|
36
|
+
import { InMemoryTaskEventStore, type TaskEventStore } from "../stores/task-event-store.ts";
|
|
37
|
+
import { InMemoryTaskFocusStore, type TaskFocusStatus, type TaskFocusStore } from "../stores/task-focus-store.ts";
|
|
38
|
+
import { InMemoryTaskLeaseStore, type TaskLeaseStore } from "../stores/task-lease-store.ts";
|
|
39
|
+
import { InMemoryTaskScopeStore, type TaskScopeStore } from "../stores/task-scope-store.ts";
|
|
40
40
|
import { assertDependencyEdgeAllowed, TaskExecutionBoundExceededError } from "./task-execution.ts";
|
|
41
41
|
|
|
42
42
|
export interface UpdateTaskInput {
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|