@ontrails/core 1.0.0-beta.2 → 1.0.0-beta.21
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/CHANGELOG.md +283 -5
- package/README.md +113 -33
- package/package.json +11 -1
- package/src/activation-provenance.ts +111 -0
- package/src/activation-source-compatibility.ts +430 -0
- package/src/activation-source-projection.ts +221 -0
- package/src/activation-source.ts +91 -0
- package/src/blob-ref.ts +51 -0
- package/src/branded.ts +1 -1
- package/src/compose-batch.ts +69 -0
- package/src/compose-schema.ts +36 -0
- package/src/context.ts +44 -10
- package/src/contour.ts +346 -0
- package/src/derive.ts +59 -18
- package/src/detours.ts +8 -0
- package/src/draft.ts +342 -0
- package/src/error-projection.ts +51 -0
- package/src/errors.ts +309 -48
- package/src/execute.ts +1577 -0
- package/src/fire.ts +1169 -0
- package/src/index.ts +477 -32
- package/src/internal/fork-ctx.ts +69 -0
- package/src/layer-projection.ts +193 -0
- package/src/layer.ts +43 -6
- package/src/observe.ts +361 -0
- package/src/path-security.ts +1 -1
- package/src/permits.ts +12 -0
- package/src/redaction/patterns.ts +6 -3
- package/src/resilience.ts +11 -11
- package/src/resource-config.ts +792 -0
- package/src/resource.ts +194 -0
- package/src/result.ts +36 -4
- package/src/run.ts +76 -0
- package/src/schedule-runtime.ts +689 -0
- package/src/schedule.ts +326 -0
- package/src/serialization.ts +119 -39
- package/src/signal-diagnostics.ts +633 -0
- package/src/signal-ref.ts +87 -0
- package/src/signal.ts +104 -0
- package/src/store/accessor-protocol.ts +56 -0
- package/src/store/index.ts +4 -0
- package/src/structured-examples.ts +248 -0
- package/src/surface-derivation.ts +91 -0
- package/src/surface-filter.ts +176 -0
- package/src/surface-versioning.ts +42 -0
- package/src/topo.ts +769 -57
- package/src/tracing.ts +345 -0
- package/src/trail.ts +1161 -29
- package/src/trails/derive-trail.ts +842 -0
- package/src/trails/index.ts +9 -0
- package/src/trails/ingest.ts +139 -0
- package/src/trails-db.ts +208 -0
- package/src/transport-error-map.ts +174 -0
- package/src/type-utils.ts +87 -0
- package/src/types.ts +254 -12
- package/src/validate-established-topo.ts +69 -0
- package/src/validate-topo.ts +442 -35
- package/src/validation.ts +152 -4
- package/src/version-marker.ts +716 -0
- package/src/version-resolution.ts +308 -0
- package/src/version-runtime.ts +120 -0
- package/src/webhook.ts +278 -0
- package/src/workspace.ts +1 -1
- package/src/zod-wrappers.ts +72 -0
- package/.turbo/turbo-build.log +0 -1
- package/.turbo/turbo-lint.log +0 -3
- package/.turbo/turbo-typecheck.log +0 -1
- package/dist/adapters.d.ts +0 -39
- package/dist/adapters.d.ts.map +0 -1
- package/dist/adapters.js +0 -2
- package/dist/adapters.js.map +0 -1
- package/dist/blob-ref.d.ts +0 -20
- package/dist/blob-ref.d.ts.map +0 -1
- package/dist/blob-ref.js +0 -22
- package/dist/blob-ref.js.map +0 -1
- package/dist/branded.d.ts +0 -36
- package/dist/branded.d.ts.map +0 -1
- package/dist/branded.js +0 -89
- package/dist/branded.js.map +0 -1
- package/dist/collections.d.ts +0 -31
- package/dist/collections.d.ts.map +0 -1
- package/dist/collections.js +0 -60
- package/dist/collections.js.map +0 -1
- package/dist/context.d.ts +0 -10
- package/dist/context.d.ts.map +0 -1
- package/dist/context.js +0 -15
- package/dist/context.js.map +0 -1
- package/dist/derive.d.ts +0 -33
- package/dist/derive.d.ts.map +0 -1
- package/dist/derive.js +0 -122
- package/dist/derive.js.map +0 -1
- package/dist/errors.d.ts +0 -83
- package/dist/errors.d.ts.map +0 -1
- package/dist/errors.js +0 -142
- package/dist/errors.js.map +0 -1
- package/dist/event.d.ts +0 -45
- package/dist/event.d.ts.map +0 -1
- package/dist/event.js +0 -17
- package/dist/event.js.map +0 -1
- package/dist/fetch.d.ts +0 -15
- package/dist/fetch.d.ts.map +0 -1
- package/dist/fetch.js +0 -102
- package/dist/fetch.js.map +0 -1
- package/dist/guards.d.ts +0 -17
- package/dist/guards.d.ts.map +0 -1
- package/dist/guards.js +0 -25
- package/dist/guards.js.map +0 -1
- package/dist/health.d.ts +0 -18
- package/dist/health.d.ts.map +0 -1
- package/dist/health.js +0 -5
- package/dist/health.js.map +0 -1
- package/dist/hike.d.ts +0 -36
- package/dist/hike.d.ts.map +0 -1
- package/dist/hike.js +0 -20
- package/dist/hike.js.map +0 -1
- package/dist/index.d.ts +0 -34
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -38
- package/dist/index.js.map +0 -1
- package/dist/job.d.ts +0 -24
- package/dist/job.d.ts.map +0 -1
- package/dist/job.js +0 -17
- package/dist/job.js.map +0 -1
- package/dist/layer.d.ts +0 -17
- package/dist/layer.d.ts.map +0 -1
- package/dist/layer.js +0 -21
- package/dist/layer.js.map +0 -1
- package/dist/path-security.d.ts +0 -28
- package/dist/path-security.d.ts.map +0 -1
- package/dist/path-security.js +0 -63
- package/dist/path-security.js.map +0 -1
- package/dist/patterns/bulk.d.ts +0 -15
- package/dist/patterns/bulk.d.ts.map +0 -1
- package/dist/patterns/bulk.js +0 -14
- package/dist/patterns/bulk.js.map +0 -1
- package/dist/patterns/change.d.ts +0 -10
- package/dist/patterns/change.d.ts.map +0 -1
- package/dist/patterns/change.js +0 -10
- package/dist/patterns/change.js.map +0 -1
- package/dist/patterns/date-range.d.ts +0 -10
- package/dist/patterns/date-range.d.ts.map +0 -1
- package/dist/patterns/date-range.js +0 -10
- package/dist/patterns/date-range.js.map +0 -1
- package/dist/patterns/index.d.ts +0 -9
- package/dist/patterns/index.d.ts.map +0 -1
- package/dist/patterns/index.js +0 -9
- package/dist/patterns/index.js.map +0 -1
- package/dist/patterns/pagination.d.ts +0 -18
- package/dist/patterns/pagination.d.ts.map +0 -1
- package/dist/patterns/pagination.js +0 -18
- package/dist/patterns/pagination.js.map +0 -1
- package/dist/patterns/progress.d.ts +0 -11
- package/dist/patterns/progress.d.ts.map +0 -1
- package/dist/patterns/progress.js +0 -11
- package/dist/patterns/progress.js.map +0 -1
- package/dist/patterns/sorting.d.ts +0 -13
- package/dist/patterns/sorting.d.ts.map +0 -1
- package/dist/patterns/sorting.js +0 -10
- package/dist/patterns/sorting.js.map +0 -1
- package/dist/patterns/status.d.ts +0 -15
- package/dist/patterns/status.d.ts.map +0 -1
- package/dist/patterns/status.js +0 -9
- package/dist/patterns/status.js.map +0 -1
- package/dist/patterns/timestamps.d.ts +0 -10
- package/dist/patterns/timestamps.d.ts.map +0 -1
- package/dist/patterns/timestamps.js +0 -10
- package/dist/patterns/timestamps.js.map +0 -1
- package/dist/redaction/index.d.ts +0 -4
- package/dist/redaction/index.d.ts.map +0 -1
- package/dist/redaction/index.js +0 -3
- package/dist/redaction/index.js.map +0 -1
- package/dist/redaction/patterns.d.ts +0 -9
- package/dist/redaction/patterns.d.ts.map +0 -1
- package/dist/redaction/patterns.js +0 -39
- package/dist/redaction/patterns.js.map +0 -1
- package/dist/redaction/redactor.d.ts +0 -27
- package/dist/redaction/redactor.d.ts.map +0 -1
- package/dist/redaction/redactor.js +0 -89
- package/dist/redaction/redactor.js.map +0 -1
- package/dist/resilience.d.ts +0 -34
- package/dist/resilience.d.ts.map +0 -1
- package/dist/resilience.js +0 -164
- package/dist/resilience.js.map +0 -1
- package/dist/result.d.ts +0 -57
- package/dist/result.d.ts.map +0 -1
- package/dist/result.js +0 -145
- package/dist/result.js.map +0 -1
- package/dist/serialization.d.ts +0 -27
- package/dist/serialization.d.ts.map +0 -1
- package/dist/serialization.js +0 -115
- package/dist/serialization.js.map +0 -1
- package/dist/topo.d.ts +0 -18
- package/dist/topo.d.ts.map +0 -1
- package/dist/topo.js +0 -74
- package/dist/topo.js.map +0 -1
- package/dist/trail.d.ts +0 -83
- package/dist/trail.d.ts.map +0 -1
- package/dist/trail.js +0 -16
- package/dist/trail.js.map +0 -1
- package/dist/types.d.ts +0 -46
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js +0 -2
- package/dist/types.js.map +0 -1
- package/dist/validate-topo.d.ts +0 -24
- package/dist/validate-topo.d.ts.map +0 -1
- package/dist/validate-topo.js +0 -108
- package/dist/validate-topo.js.map +0 -1
- package/dist/validation.d.ts +0 -27
- package/dist/validation.d.ts.map +0 -1
- package/dist/validation.js +0 -134
- package/dist/validation.js.map +0 -1
- package/dist/workspace.d.ts +0 -25
- package/dist/workspace.d.ts.map +0 -1
- package/dist/workspace.js +0 -57
- package/dist/workspace.js.map +0 -1
- package/src/__tests__/blob-ref.test.ts +0 -103
- package/src/__tests__/branded.test.ts +0 -148
- package/src/__tests__/collections.test.ts +0 -126
- package/src/__tests__/context.test.ts +0 -66
- package/src/__tests__/derive.test.ts +0 -159
- package/src/__tests__/errors.test.ts +0 -309
- package/src/__tests__/event.test.ts +0 -82
- package/src/__tests__/fetch.test.ts +0 -217
- package/src/__tests__/guards.test.ts +0 -102
- package/src/__tests__/hike.test.ts +0 -117
- package/src/__tests__/job.test.ts +0 -98
- package/src/__tests__/layer.test.ts +0 -224
- package/src/__tests__/path-security.test.ts +0 -114
- package/src/__tests__/patterns.test.ts +0 -273
- package/src/__tests__/redaction.test.ts +0 -244
- package/src/__tests__/resilience.test.ts +0 -246
- package/src/__tests__/result.test.ts +0 -155
- package/src/__tests__/serialization.test.ts +0 -236
- package/src/__tests__/topo.test.ts +0 -184
- package/src/__tests__/trail.test.ts +0 -179
- package/src/__tests__/validate-topo.test.ts +0 -201
- package/src/__tests__/validation.test.ts +0 -283
- package/src/__tests__/workspace.test.ts +0 -183
- package/src/adapters.ts +0 -68
- package/src/event.ts +0 -77
- package/src/health.ts +0 -23
- package/src/hike.ts +0 -77
- package/src/job.ts +0 -20
- package/tsconfig.json +0 -9
- package/tsconfig.tsbuildinfo +0 -1
package/src/adapters.ts
DELETED
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import type { Result } from './result.js';
|
|
2
|
-
|
|
3
|
-
// ---------------------------------------------------------------------------
|
|
4
|
-
// Shared option types
|
|
5
|
-
// ---------------------------------------------------------------------------
|
|
6
|
-
|
|
7
|
-
/** Options for search queries */
|
|
8
|
-
export interface SearchOptions {
|
|
9
|
-
readonly limit?: number | undefined;
|
|
10
|
-
readonly offset?: number | undefined;
|
|
11
|
-
readonly filters?: Readonly<Record<string, unknown>> | undefined;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
/** A single search hit */
|
|
15
|
-
export interface SearchResult {
|
|
16
|
-
readonly id: string;
|
|
17
|
-
readonly score: number;
|
|
18
|
-
readonly document: Readonly<Record<string, unknown>>;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
/** Options for storage writes */
|
|
22
|
-
export interface StorageOptions {
|
|
23
|
-
/** Time-to-live in milliseconds */
|
|
24
|
-
readonly ttl?: number | undefined;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
// ---------------------------------------------------------------------------
|
|
28
|
-
// Adapter port interfaces
|
|
29
|
-
// ---------------------------------------------------------------------------
|
|
30
|
-
|
|
31
|
-
/** Full-text / vector index adapter */
|
|
32
|
-
export interface IndexAdapter {
|
|
33
|
-
index(
|
|
34
|
-
id: string,
|
|
35
|
-
document: Readonly<Record<string, unknown>>
|
|
36
|
-
): Promise<Result<void, Error>>;
|
|
37
|
-
|
|
38
|
-
search(
|
|
39
|
-
query: string,
|
|
40
|
-
options?: SearchOptions
|
|
41
|
-
): Promise<Result<readonly SearchResult[], Error>>;
|
|
42
|
-
|
|
43
|
-
remove(id: string): Promise<Result<void, Error>>;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
/** Key-value storage adapter */
|
|
47
|
-
export interface StorageAdapter {
|
|
48
|
-
get(key: string): Promise<Result<unknown, Error>>;
|
|
49
|
-
set(
|
|
50
|
-
key: string,
|
|
51
|
-
value: unknown,
|
|
52
|
-
options?: StorageOptions
|
|
53
|
-
): Promise<Result<void, Error>>;
|
|
54
|
-
delete(key: string): Promise<Result<void, Error>>;
|
|
55
|
-
has(key: string): Promise<Result<boolean, Error>>;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
/** Cache adapter with typed get/set and bulk clear */
|
|
59
|
-
export interface CacheAdapter {
|
|
60
|
-
get<T>(key: string): Promise<Result<T | undefined, Error>>;
|
|
61
|
-
set<T>(
|
|
62
|
-
key: string,
|
|
63
|
-
value: T,
|
|
64
|
-
options?: StorageOptions
|
|
65
|
-
): Promise<Result<void, Error>>;
|
|
66
|
-
delete(key: string): Promise<Result<void, Error>>;
|
|
67
|
-
clear(): Promise<Result<void, Error>>;
|
|
68
|
-
}
|
package/src/event.ts
DELETED
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Event — a named payload schema with optional provenance metadata.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import type { z } from 'zod';
|
|
6
|
-
|
|
7
|
-
// ---------------------------------------------------------------------------
|
|
8
|
-
// Spec (input to the factory)
|
|
9
|
-
// ---------------------------------------------------------------------------
|
|
10
|
-
|
|
11
|
-
export interface EventSpec<T> {
|
|
12
|
-
readonly payload: z.ZodType<T>;
|
|
13
|
-
readonly description?: string | undefined;
|
|
14
|
-
readonly markers?: Readonly<Record<string, unknown>> | undefined;
|
|
15
|
-
/** Trail IDs that produce this event (e.g. the trails it originates from). */
|
|
16
|
-
readonly from?: readonly string[] | undefined;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
// ---------------------------------------------------------------------------
|
|
20
|
-
// Shape (output of the factory)
|
|
21
|
-
// ---------------------------------------------------------------------------
|
|
22
|
-
|
|
23
|
-
export interface Event<T> {
|
|
24
|
-
readonly id: string;
|
|
25
|
-
readonly kind: 'event';
|
|
26
|
-
readonly payload: z.ZodType<T>;
|
|
27
|
-
readonly description?: string | undefined;
|
|
28
|
-
readonly markers?: Readonly<Record<string, unknown>> | undefined;
|
|
29
|
-
/** Trail IDs that produce this event (e.g. the trails it originates from). */
|
|
30
|
-
readonly from?: readonly string[] | undefined;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
// ---------------------------------------------------------------------------
|
|
34
|
-
// Factory
|
|
35
|
-
// ---------------------------------------------------------------------------
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* Create an event definition.
|
|
39
|
-
*
|
|
40
|
-
* An event is a named payload schema describing something that happened.
|
|
41
|
-
* Returns a frozen object with `kind: "event"` and all spec fields.
|
|
42
|
-
*
|
|
43
|
-
* @example
|
|
44
|
-
* ```typescript
|
|
45
|
-
* // ID as first argument
|
|
46
|
-
* const updated = event("entity.updated", {
|
|
47
|
-
* payload: EntityUpdatedSchema,
|
|
48
|
-
* from: ["entity.add", "entity.update"],
|
|
49
|
-
* });
|
|
50
|
-
*
|
|
51
|
-
* // Full spec object (programmatic)
|
|
52
|
-
* const updated = event({ id: "entity.updated", payload: ..., from: [...] });
|
|
53
|
-
* ```
|
|
54
|
-
*/
|
|
55
|
-
export function event<T>(id: string, spec: EventSpec<T>): Event<T>;
|
|
56
|
-
export function event<T>(
|
|
57
|
-
spec: EventSpec<T> & { readonly id: string }
|
|
58
|
-
): Event<T>;
|
|
59
|
-
export function event<T>(
|
|
60
|
-
idOrSpec: string | (EventSpec<T> & { readonly id: string }),
|
|
61
|
-
maybeSpec?: EventSpec<T>
|
|
62
|
-
): Event<T> {
|
|
63
|
-
const resolvedId = typeof idOrSpec === 'string' ? idOrSpec : idOrSpec.id;
|
|
64
|
-
// oxlint-disable-next-line no-non-null-assertion -- overload guarantees maybeSpec when idOrSpec is string
|
|
65
|
-
const resolvedSpec = typeof idOrSpec === 'string' ? maybeSpec! : idOrSpec;
|
|
66
|
-
return Object.freeze({
|
|
67
|
-
description: resolvedSpec.description,
|
|
68
|
-
from: resolvedSpec.from ? Object.freeze([...resolvedSpec.from]) : undefined,
|
|
69
|
-
id: resolvedId,
|
|
70
|
-
kind: 'event' as const,
|
|
71
|
-
markers: resolvedSpec.markers,
|
|
72
|
-
payload: resolvedSpec.payload,
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
/** Existential type for heterogeneous event collections */
|
|
77
|
-
export type AnyEvent = Event<unknown>;
|
package/src/health.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
// ---------------------------------------------------------------------------
|
|
2
|
-
// Health check types
|
|
3
|
-
// ---------------------------------------------------------------------------
|
|
4
|
-
|
|
5
|
-
/** Aggregate health status */
|
|
6
|
-
export type HealthStatus = 'healthy' | 'degraded' | 'unhealthy';
|
|
7
|
-
|
|
8
|
-
/** Individual component check result */
|
|
9
|
-
export interface HealthCheck {
|
|
10
|
-
readonly status: HealthStatus;
|
|
11
|
-
readonly message?: string | undefined;
|
|
12
|
-
/** Latency in milliseconds */
|
|
13
|
-
readonly latency?: number | undefined;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
/** Full health report returned by a health endpoint */
|
|
17
|
-
export interface HealthResult {
|
|
18
|
-
readonly status: HealthStatus;
|
|
19
|
-
readonly checks: Readonly<Record<string, HealthCheck>>;
|
|
20
|
-
readonly version?: string | undefined;
|
|
21
|
-
/** Uptime in seconds */
|
|
22
|
-
readonly uptime?: number | undefined;
|
|
23
|
-
}
|
package/src/hike.ts
DELETED
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Hike — a composition that follows trails.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import type { Trail, TrailSpec } from './trail.js';
|
|
6
|
-
import type { TrailContext } from './types.js';
|
|
7
|
-
|
|
8
|
-
// ---------------------------------------------------------------------------
|
|
9
|
-
// Spec (input to the factory)
|
|
10
|
-
// ---------------------------------------------------------------------------
|
|
11
|
-
|
|
12
|
-
export interface HikeSpec<I, O> extends TrailSpec<I, O> {
|
|
13
|
-
readonly follows: readonly string[];
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
// ---------------------------------------------------------------------------
|
|
17
|
-
// Shape (output of the factory)
|
|
18
|
-
// ---------------------------------------------------------------------------
|
|
19
|
-
|
|
20
|
-
export interface Hike<I, O> extends Omit<Trail<I, O>, 'kind'> {
|
|
21
|
-
readonly kind: 'hike';
|
|
22
|
-
readonly follows: readonly string[];
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
// ---------------------------------------------------------------------------
|
|
26
|
-
// Factory
|
|
27
|
-
// ---------------------------------------------------------------------------
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* Create a hike definition.
|
|
31
|
-
*
|
|
32
|
-
* A hike is a composition that declares which trails it follows.
|
|
33
|
-
* Returns a frozen object with `kind: "hike"` and all spec fields.
|
|
34
|
-
*
|
|
35
|
-
* @example
|
|
36
|
-
* ```typescript
|
|
37
|
-
* // ID as first argument
|
|
38
|
-
* const onboard = hike("entity.onboard", {
|
|
39
|
-
* follows: ["entity.add", "entity.relate"],
|
|
40
|
-
* input: z.object({ name: z.string() }),
|
|
41
|
-
* implementation: (input, ctx) => Result.ok(...),
|
|
42
|
-
* });
|
|
43
|
-
*
|
|
44
|
-
* // Full spec object (programmatic)
|
|
45
|
-
* const onboard = hike({ id: "entity.onboard", follows: [...], ... });
|
|
46
|
-
* ```
|
|
47
|
-
*/
|
|
48
|
-
export function hike<I, O>(id: string, spec: HikeSpec<I, O>): Hike<I, O>;
|
|
49
|
-
export function hike<I, O>(
|
|
50
|
-
spec: HikeSpec<I, O> & { readonly id: string }
|
|
51
|
-
): Hike<I, O>;
|
|
52
|
-
export function hike<I, O>(
|
|
53
|
-
idOrSpec: string | (HikeSpec<I, O> & { readonly id: string }),
|
|
54
|
-
maybeSpec?: HikeSpec<I, O>
|
|
55
|
-
): Hike<I, O> {
|
|
56
|
-
const resolved =
|
|
57
|
-
typeof idOrSpec === 'string'
|
|
58
|
-
? { id: idOrSpec, spec: maybeSpec }
|
|
59
|
-
: { id: idOrSpec.id, spec: idOrSpec };
|
|
60
|
-
|
|
61
|
-
if (!resolved.spec) {
|
|
62
|
-
throw new TypeError('hike() requires a spec when an id is provided');
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
const { follows, implementation, ...rest } = resolved.spec;
|
|
66
|
-
return Object.freeze({
|
|
67
|
-
...rest,
|
|
68
|
-
follows: Object.freeze([...follows]),
|
|
69
|
-
id: resolved.id,
|
|
70
|
-
implementation: async (input: I, ctx: TrailContext) =>
|
|
71
|
-
await implementation(input, ctx),
|
|
72
|
-
kind: 'hike' as const,
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
// oxlint-disable-next-line no-explicit-any -- existential type; see AnyTrail
|
|
77
|
-
export type AnyHike = Hike<any, any>;
|
package/src/job.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
|
|
3
|
-
import { progressFields } from './patterns/progress.js';
|
|
4
|
-
import { statusFields } from './patterns/status.js';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Proof: job-style output schema composes from existing pattern helpers.
|
|
8
|
-
* No dedicated `kind: "job"` needed — regular trails with status+progress output work.
|
|
9
|
-
*/
|
|
10
|
-
export const jobOutputSchema = z.object({
|
|
11
|
-
...progressFields().shape,
|
|
12
|
-
...statusFields().shape,
|
|
13
|
-
completedAt: z.string().optional(),
|
|
14
|
-
error: z.string().optional(),
|
|
15
|
-
jobId: z.string(),
|
|
16
|
-
result: z.unknown().optional(),
|
|
17
|
-
startedAt: z.string().optional(),
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
export type JobOutput = z.infer<typeof jobOutputSchema>;
|
package/tsconfig.json
DELETED
package/tsconfig.tsbuildinfo
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"root":["./src/adapters.ts","./src/blob-ref.ts","./src/branded.ts","./src/collections.ts","./src/context.ts","./src/derive.ts","./src/errors.ts","./src/event.ts","./src/fetch.ts","./src/guards.ts","./src/health.ts","./src/hike.ts","./src/index.ts","./src/job.ts","./src/layer.ts","./src/path-security.ts","./src/resilience.ts","./src/result.ts","./src/serialization.ts","./src/topo.ts","./src/trail.ts","./src/types.ts","./src/validate-topo.ts","./src/validation.ts","./src/workspace.ts","./src/patterns/bulk.ts","./src/patterns/change.ts","./src/patterns/date-range.ts","./src/patterns/index.ts","./src/patterns/pagination.ts","./src/patterns/progress.ts","./src/patterns/sorting.ts","./src/patterns/status.ts","./src/patterns/timestamps.ts","./src/redaction/index.ts","./src/redaction/patterns.ts","./src/redaction/redactor.ts"],"version":"5.9.3"}
|