@validation-engineering/cordis-compat-deepseek 0.0.0-stage → 0.1.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/LICENSE +22 -0
- package/NOTICE +49 -0
- package/README.md +23 -2
- package/index.cjs +1 -0
- package/index.d.ts +270 -0
- package/index.js +5 -0
- package/package.json +40 -4
- package/register.js +2 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 cordis-verus contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
22
|
+
|
package/NOTICE
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
This is an independent Rust reimplementation of a subset of Cordis semantics.
|
|
2
|
+
It is not an official Cordis, DeepSeek, or Verus distribution.
|
|
3
|
+
|
|
4
|
+
Design and behavior references:
|
|
5
|
+
- Cordis, https://github.com/cordiverse/cordis (MIT)
|
|
6
|
+
- DeepSeek Harness, https://github.com/deepseek-ai/deepseek-harness (MIT)
|
|
7
|
+
- A Programming Paradigm for Spatiotemporal Composability,
|
|
8
|
+
https://arxiv.org/abs/2608.25512v1 (https://github.com/validation-engineering/cordis-verus/blob/main/reference/README.md)
|
|
9
|
+
|
|
10
|
+
The ignored upstream checkouts retain their own license and copyright files.
|
|
11
|
+
The reference paper is not covered by this project's MIT license.
|
|
12
|
+
Verus binaries and vstd retain their upstream licenses. Binary archives are
|
|
13
|
+
downloaded into the ignored .tools directory. Project-managed toolchain archives
|
|
14
|
+
preserve original upstream bytes with a source/notices companion; see
|
|
15
|
+
https://github.com/validation-engineering/cordis-verus/blob/main/docs/toolchains/README.md.
|
|
16
|
+
They are separate from Cordis runtime releases.
|
|
17
|
+
|
|
18
|
+
The experimental JavaScript compatibility package adapts language-layer code
|
|
19
|
+
from Cordis (Copyright (c) 2021-present Shigma, MIT). The original MIT notice
|
|
20
|
+
is preserved in packages/compat-cordis/LICENSE.upstream. It does not embed the
|
|
21
|
+
upstream Fiber lifecycle scheduler. Node-API dependencies retain their own licenses.
|
|
22
|
+
|
|
23
|
+
The compatibility logger in packages/compat-cordis/logger.js is adapted from
|
|
24
|
+
Cordis packages/core/src/logger.ts at the locked Cordis revision. Its formatting,
|
|
25
|
+
exporter and traceable-caller behavior are ordinary JavaScript, outside the
|
|
26
|
+
Verus proof boundary, and retain the same MIT attribution above.
|
|
27
|
+
|
|
28
|
+
Windows configuration persistence uses atomicwrites 0.4.4
|
|
29
|
+
(https://github.com/untitaker/rust-atomicwrites), under the MIT license:
|
|
30
|
+
|
|
31
|
+
Copyright (c) 2015 Markus Unterwaditzer
|
|
32
|
+
|
|
33
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
34
|
+
this software and associated documentation files (the "Software"), to deal in
|
|
35
|
+
the Software without restriction, including without limitation the rights to
|
|
36
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
37
|
+
of the Software, and to permit persons to whom the Software is furnished to do
|
|
38
|
+
so, subject to the following conditions:
|
|
39
|
+
|
|
40
|
+
The above copyright notice and this permission notice shall be included in all
|
|
41
|
+
copies or substantial portions of the Software.
|
|
42
|
+
|
|
43
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
44
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
45
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
46
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
47
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
48
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
49
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,24 @@
|
|
|
1
|
-
#
|
|
1
|
+
# DeepSeek Cordis compatibility
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
`@validation-engineering/cordis-compat-deepseek` provides compatibility with the pinned **`@deepseek-ai/cordis` 4.0.4** interface over the shared Rust driver. It is a Cordis runtime interface, not the complete DeepSeek Harness application. Use the companion Harness application for the official CLI, Web UI and agent workflows.
|
|
4
|
+
|
|
5
|
+
The name identifies the compatible runtime distribution: **Cordis**, **compatibility**, **DeepSeek**. This replaces the ambiguous `@validation-engineering/cordis-harness` package name. The internal `harness` policy and lifecycle behavior remain unchanged. See [package boundaries and migration](../../docs/package-boundaries.md).
|
|
6
|
+
|
|
7
|
+
```js
|
|
8
|
+
import { Context } from '@validation-engineering/cordis-compat-deepseek';
|
|
9
|
+
const app = new Context();
|
|
10
|
+
const instance = await app.plugin((ctx, config) => {
|
|
11
|
+
ctx.logger.info('started', config);
|
|
12
|
+
}, { enabled: true });
|
|
13
|
+
instance.update({ enabled: false }); // Harness update returns void
|
|
14
|
+
await instance.await();
|
|
15
|
+
await app.dispose();
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
For unchanged plugins importing the upstream name, start Node 22.22 or newer with `--import @validation-engineering/cordis-compat-deepseek/register`. ESM, dynamic import, CommonJS and createRequire route bare `@deepseek-ai/cordis` to this package. Mixed Cordis profiles and upstream deep imports are rejected by the bootstrap. The core npm package includes the matching precompiled native addon for all four supported platforms; compiling is only needed for source development or custom native code.
|
|
19
|
+
|
|
20
|
+
Raw configuration is resolved through `internal/config` and Standard Schema on every activation, after required services are available. Pending updates defer resolution. Active updates resolve synchronously and emit `internal/update`; their return value is void. Related dependency notifications may retry failed setup. Cleanup failures remain blocked until an explicit retry succeeds.
|
|
21
|
+
|
|
22
|
+
The facade intentionally fixes the upstream wrapper receiver defect: `ctx.plugin(...).update(...)` targets the actual fiber, just as the standalone profile does. Native cancellation, publication lease draining and cleanup failure reporting are stronger contracts than upstream; full behavioral equality is not claimed. The shared Logger/Context/Service API does not mean every Harness Loader, lazy/volatile configuration, HMR or application package is supported. See `docs/node-compatibility.md` for the evidence matrix.
|
|
23
|
+
|
|
24
|
+
Type declarations are generated from the common facade surface by `scripts/sync-profile-types.mjs`, with Harness's void update contract and its own Context augmentation scope.
|
package/index.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('./index.js');
|
package/index.d.ts
ADDED
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
// Generated by scripts/sync-profile-types.mjs; edit the common Cordis declarations.
|
|
2
|
+
export type JsonValue = null | boolean | number | string | JsonValue[] | { [key: string]: JsonValue };
|
|
3
|
+
/** Pull-driven Rust resource. At most one next() may be outstanding. */
|
|
4
|
+
export interface RustStream<T extends JsonValue = JsonValue> extends AsyncIterableIterator<T> {
|
|
5
|
+
next(): Promise<IteratorResult<T, undefined>>;
|
|
6
|
+
return(): Promise<IteratorResult<T, undefined>>;
|
|
7
|
+
throw(error: unknown): Promise<IteratorResult<T, undefined>>;
|
|
8
|
+
}
|
|
9
|
+
declare const objectAdapterBrand: unique symbol;
|
|
10
|
+
/** Explicit factory return value; cannot be encoded in ordinary JSON arguments. */
|
|
11
|
+
export interface JavaScriptObjectAdapter { readonly [objectAdapterBrand]: true; }
|
|
12
|
+
export type ObjectAdapterOptions<T extends object> = {
|
|
13
|
+
readonly typeName: string;
|
|
14
|
+
readonly methods: readonly string[];
|
|
15
|
+
} & ({readonly ownership: 'borrowed'; readonly dispose?: never} | {
|
|
16
|
+
readonly ownership: 'owned'; readonly dispose: (target: T) => Awaitable<void>;
|
|
17
|
+
});
|
|
18
|
+
export function adaptObject<T extends object>(target: T, options: ObjectAdapterOptions<T>): JavaScriptObjectAdapter;
|
|
19
|
+
export function adaptCallback<T extends (...args: any[]) => Awaitable<JsonValue | void>>(callback: T, options?: {
|
|
20
|
+
readonly typeName?: string;
|
|
21
|
+
} & ({readonly ownership?: 'borrowed'; readonly dispose?: never} | {
|
|
22
|
+
readonly ownership: 'owned'; readonly dispose: (callback: T) => Awaitable<void>;
|
|
23
|
+
})): JavaScriptObjectAdapter;
|
|
24
|
+
export interface RustObject {
|
|
25
|
+
readonly typeName: string;
|
|
26
|
+
readonly ownership: 'borrowed' | 'owned';
|
|
27
|
+
readonly methods: readonly string[];
|
|
28
|
+
call(method: string, ...args: JsonValue[]): Promise<JsonValue>;
|
|
29
|
+
close(): Promise<void>;
|
|
30
|
+
}
|
|
31
|
+
export interface RustCallback extends RustObject {
|
|
32
|
+
invoke(...args: JsonValue[]): Promise<JsonValue>;
|
|
33
|
+
}
|
|
34
|
+
export type Awaitable<T> = T | PromiseLike<T>;
|
|
35
|
+
export type Disposable = () => Awaitable<void>;
|
|
36
|
+
export type Effect = void | Disposable | PromiseLike<void | Disposable> | Iterable<void | Disposable> | AsyncIterable<void | Disposable>;
|
|
37
|
+
export interface AsyncDisposable extends Disposable { then<TResult1 = Disposable, TResult2 = never>(onfulfilled?: ((value: Disposable) => TResult1 | PromiseLike<TResult1>) | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null): Promise<TResult1 | TResult2>; }
|
|
38
|
+
export interface OwnedTask<T> { readonly promise: Promise<T>; readonly signal: AbortSignal; cancel(reason?: unknown): void; join(): Promise<T>; }
|
|
39
|
+
export type Inject = string[] | Record<string, unknown>;
|
|
40
|
+
export interface PluginOptions<T = any> { name?: string; inject?: Inject; provide?: string | string[]; Config?: { '~standard': { validate(value: unknown): { value: T } | { issues: readonly {message: string}[] } } }; }
|
|
41
|
+
export type Plugin<T = any> = Plugin.Function<T> | Plugin.Constructor<T> | Plugin.Object<T>;
|
|
42
|
+
export namespace Plugin {
|
|
43
|
+
interface Function<T = any> extends PluginOptions<T> { (ctx: Context, config: T): Effect; }
|
|
44
|
+
interface Constructor<T = any> extends PluginOptions<T> { new (ctx: Context, config: T): object; }
|
|
45
|
+
interface Object<T = any> extends PluginOptions<T> { apply(ctx: Context, config: T): Effect; }
|
|
46
|
+
}
|
|
47
|
+
export interface Events { [name: string | symbol]: (...args: any[]) => any; }
|
|
48
|
+
export interface EventOptions { prepend?: boolean; global?: boolean; }
|
|
49
|
+
/** Record counts, not allocated bytes. Node/publication tombstones remain; released lease records are removed. */
|
|
50
|
+
export interface DriverStorageStats {
|
|
51
|
+
registeredPlugins: number;
|
|
52
|
+
identitySlots: number;
|
|
53
|
+
declarationRecords: number;
|
|
54
|
+
bindingRecords: number;
|
|
55
|
+
liveBindings: number;
|
|
56
|
+
publicationRecords: number;
|
|
57
|
+
/** Actual stored lease records, including leases held by failed cleanup. */
|
|
58
|
+
leaseRecords: number;
|
|
59
|
+
/** Cumulative successful allocations; lease IDs never repeat. */
|
|
60
|
+
leaseAllocations: number;
|
|
61
|
+
liveLeases: number;
|
|
62
|
+
publishedValues: number;
|
|
63
|
+
pendingActions: number;
|
|
64
|
+
}
|
|
65
|
+
/** Decimal strings preserve native identities beyond JavaScript's safe integers. */
|
|
66
|
+
export interface DiagnosticPort { key: string; realm: string; service?: string; realmLabel?: string; }
|
|
67
|
+
export interface EpisodeIdentity { id: string; generation: string | null; }
|
|
68
|
+
export interface DiagnosticBinding extends DiagnosticPort {
|
|
69
|
+
provider: string;
|
|
70
|
+
generation: string | null;
|
|
71
|
+
publication: string | null;
|
|
72
|
+
}
|
|
73
|
+
export type DiagnosticPhase = 'Pending' | 'Failed' | 'Loading' | 'Active' | 'Unloading';
|
|
74
|
+
export interface DriverActionTicket { domain: string; id: string; generation: string; action: string; kind: 'setup' | 'cleanup'; }
|
|
75
|
+
export interface DriverCheckTicket {
|
|
76
|
+
domain: string; consumer: string; port: DiagnosticPort; publication: string;
|
|
77
|
+
value_revision: string; notification: string; action: string;
|
|
78
|
+
}
|
|
79
|
+
export interface DiagnosticCheck { port: DiagnosticPort; provider: string; publication: string; }
|
|
80
|
+
export type DriverBlocker =
|
|
81
|
+
| {code: 'MissingProvider'; port: DiagnosticPort}
|
|
82
|
+
| {code: 'RealmMismatch'; port: DiagnosticPort; observedRealms: string[]}
|
|
83
|
+
| {code: 'ProviderUnavailable'; port: DiagnosticPort; providers: (EpisodeIdentity & {state: DiagnosticPhase; retired: boolean})[]}
|
|
84
|
+
| {code: 'PublicationMissing'; port: DiagnosticPort; provider: string}
|
|
85
|
+
| (DiagnosticCheck & {code: 'CheckNotEvaluated' | 'CheckRejected'})
|
|
86
|
+
| (DiagnosticCheck & {code: 'CheckPending'; ticket: DriverCheckTicket})
|
|
87
|
+
| (DiagnosticCheck & {code: 'CheckError'; error: string})
|
|
88
|
+
| (DiagnosticCheck & ({code: 'CheckInvalidated'; ticket: DriverCheckTicket} | {code: 'CheckInvalidated'; error: string | null}))
|
|
89
|
+
| {code: 'CommittedConsumers'; consumers: EpisodeIdentity[]}
|
|
90
|
+
| {code: 'PendingAction'; ticket: DriverActionTicket}
|
|
91
|
+
| {code: 'RetiringChildren'; children: EpisodeIdentity[]}
|
|
92
|
+
| {code: 'CleanupFailed'; error: string | null; retryable: true}
|
|
93
|
+
| {code: 'Failed'; error: string}
|
|
94
|
+
| {code: 'TargetChanged' | 'Unsealed'};
|
|
95
|
+
export interface InverseObservation {
|
|
96
|
+
id: string; owner: string; generation: string | null; registeredGeneration: string | null; parent: string | null;
|
|
97
|
+
label: string; state: 'registered' | 'waiting' | 'running' | 'failed'; attempts: number;
|
|
98
|
+
error?: string;
|
|
99
|
+
/** Observed duration of this running attempt; only with includeTiming. */
|
|
100
|
+
elapsedMs?: number;
|
|
101
|
+
}
|
|
102
|
+
export interface HostObservation {
|
|
103
|
+
inverses: InverseObservation[];
|
|
104
|
+
action?: {ticket: DriverActionTicket; stage: 'setup' | 'cleanup' | 'draining-tasks' | 'inverses' | 'draining-calls' | 'closing-objects' | 'closing-sessions'; elapsedMs?: number};
|
|
105
|
+
}
|
|
106
|
+
export interface DriverPluginSnapshot extends EpisodeIdentity {
|
|
107
|
+
parent: string | null; state: DiagnosticPhase; retired: boolean; error: string | null;
|
|
108
|
+
cleanupFailed: boolean; pendingAction: DriverActionTicket | null;
|
|
109
|
+
dependencies: DiagnosticPort[]; committed: DiagnosticBinding[]; target: DiagnosticBinding[] | null;
|
|
110
|
+
blockers: DriverBlocker[]; host?: HostObservation;
|
|
111
|
+
}
|
|
112
|
+
export interface DriverSnapshot {
|
|
113
|
+
abi: 1; diagnosticsSchema: 'cordis.driver/v1'; domain: string; profile: 'cordis' | 'harness';
|
|
114
|
+
plugins: DriverPluginSnapshot[]; storage: DriverStorageStats;
|
|
115
|
+
checkErrors: (DiagnosticPort & {consumer: string; error: string})[];
|
|
116
|
+
diagnostics: {kind: 'service-check' | 'mutation-step'; consumer?: string; error: string}[];
|
|
117
|
+
}
|
|
118
|
+
export interface EpisodeErrorDetails {
|
|
119
|
+
owner: string | null; requestedGeneration: string | null; currentGeneration: string | null;
|
|
120
|
+
removed: boolean; operation: string;
|
|
121
|
+
}
|
|
122
|
+
export class Context {
|
|
123
|
+
static readonly effect: unique symbol;
|
|
124
|
+
static readonly filter: unique symbol;
|
|
125
|
+
static readonly isolate: unique symbol;
|
|
126
|
+
static readonly intercept: unique symbol;
|
|
127
|
+
static is(value: unknown): value is Context;
|
|
128
|
+
constructor(options?: { addon?: string });
|
|
129
|
+
root: this;
|
|
130
|
+
fiber: Fiber;
|
|
131
|
+
registry: RegistryService;
|
|
132
|
+
reflect: ReflectService;
|
|
133
|
+
events: EventsService;
|
|
134
|
+
logger: LoggerService;
|
|
135
|
+
[Context.isolate]: Record<string, symbol>;
|
|
136
|
+
[Context.intercept]: Record<string, any>;
|
|
137
|
+
extend(meta?: object): this;
|
|
138
|
+
isolate(name: string, label?: symbol): this;
|
|
139
|
+
intercept(name: string, config: unknown): this;
|
|
140
|
+
plugin<T>(plugin: Plugin<T>, config?: T): Fiber & PromiseLike<Fiber>;
|
|
141
|
+
rustPlugin(name: string, config?: JsonValue): Fiber & PromiseLike<Fiber>;
|
|
142
|
+
inject(deps: Inject, callback: (ctx: Context) => Effect): Fiber & PromiseLike<Fiber>;
|
|
143
|
+
effect(execute: () => Effect, label?: string): AsyncDisposable;
|
|
144
|
+
task<T>(execute: (signal: AbortSignal) => Awaitable<T>, label?: string): OwnedTask<Awaited<T>>;
|
|
145
|
+
get(name: string, strict?: boolean): any;
|
|
146
|
+
set(name: string, value: any): void;
|
|
147
|
+
provide(name: string, value?: any, check?: () => boolean): AsyncDisposable;
|
|
148
|
+
accessor(name: string, options: { get(this: Context, receiver: any, error: Error): any; set?(this: Context, value: any, receiver: any, error: Error): boolean }): AsyncDisposable;
|
|
149
|
+
mixin(source: string | object, mixins: string[] | Record<string,string>): AsyncDisposable;
|
|
150
|
+
on<K extends keyof Events>(name: K, listener: Events[K], options?: boolean | EventOptions): Disposable;
|
|
151
|
+
once<K extends keyof Events>(name: K, listener: Events[K], options?: boolean | EventOptions): Disposable;
|
|
152
|
+
emit<K extends keyof Events>(name: K, ...args: Parameters<Events[K]>): void;
|
|
153
|
+
bail(name: keyof Events, ...args: any[]): any;
|
|
154
|
+
serial(name: keyof Events, ...args: any[]): Promise<any>;
|
|
155
|
+
parallel(name: keyof Events, ...args: any[]): Promise<void>;
|
|
156
|
+
waterfall(name: keyof Events, ...args: any[]): any;
|
|
157
|
+
settle(): Promise<void>;
|
|
158
|
+
dispose(): Promise<void>;
|
|
159
|
+
/** Read-only observation. Timing is opt-in and does not diagnose deadlock or progress. */
|
|
160
|
+
snapshot(options?: {includeTiming?: boolean}): DriverSnapshot;
|
|
161
|
+
}
|
|
162
|
+
export const FiberState: Readonly<{PENDING: 0; LOADING: 1; ACTIVE: 2; FAILED: 3; DISPOSED: 4; UNLOADING: 5}>;
|
|
163
|
+
export class Fiber {
|
|
164
|
+
readonly id: string;
|
|
165
|
+
uid: number | null;
|
|
166
|
+
readonly ctx: Context;
|
|
167
|
+
readonly parent: Context;
|
|
168
|
+
state: number;
|
|
169
|
+
/** Current native-admitted setup/cleanup transition; failure is reported by await(). */
|
|
170
|
+
inertia: Promise<void> | undefined;
|
|
171
|
+
config: any;
|
|
172
|
+
inject: Record<string, any>;
|
|
173
|
+
runtime: {name?: string; callback: Function; fibers: Iterable<Fiber>} | null;
|
|
174
|
+
readonly name: string;
|
|
175
|
+
dispose(): Promise<void>;
|
|
176
|
+
await(): Promise<Fiber>;
|
|
177
|
+
effect(execute: () => Effect, label?: string): AsyncDisposable;
|
|
178
|
+
task<T>(execute: (signal: AbortSignal) => Awaitable<T>, label?: string): OwnedTask<Awaited<T>>;
|
|
179
|
+
restart(): Promise<void>;
|
|
180
|
+
retryCleanup(): Promise<void>;
|
|
181
|
+
update(config: any, noSave?: boolean): void;
|
|
182
|
+
getEffects(): {label: string;children: unknown[]}[];
|
|
183
|
+
}
|
|
184
|
+
export abstract class Service<T = never> {
|
|
185
|
+
static readonly init: unique symbol;
|
|
186
|
+
static readonly check: unique symbol;
|
|
187
|
+
static readonly config: unique symbol;
|
|
188
|
+
static readonly invoke: unique symbol;
|
|
189
|
+
static readonly extend: unique symbol;
|
|
190
|
+
static readonly tracker: unique symbol;
|
|
191
|
+
static readonly resolveConfig: unique symbol;
|
|
192
|
+
protected ctx: Context;
|
|
193
|
+
name: string;
|
|
194
|
+
constructor(ctx: Context, name?: string);
|
|
195
|
+
[Service.config]: T;
|
|
196
|
+
protected [Service.extend](props?: object): this;
|
|
197
|
+
[Service.resolveConfig](base?: T, head?: T): T;
|
|
198
|
+
}
|
|
199
|
+
export class RegistryService {
|
|
200
|
+
readonly size: number;
|
|
201
|
+
plugin<T>(plugin: Plugin<T>, config?: T): Fiber & PromiseLike<Fiber>;
|
|
202
|
+
inject(deps: Inject, callback: (ctx: Context) => Effect): Fiber & PromiseLike<Fiber>;
|
|
203
|
+
get(plugin: Plugin): object | undefined;
|
|
204
|
+
has(plugin: Plugin): boolean;
|
|
205
|
+
delete(plugin: Plugin): object | undefined;
|
|
206
|
+
keys(): IterableIterator<Function>;
|
|
207
|
+
values(): IterableIterator<any>;
|
|
208
|
+
}
|
|
209
|
+
export class ReflectService { get(name: string, strict?: boolean): any; set(name: string, value: any): boolean; provide(name: string, value?: any, check?: () => boolean): AsyncDisposable; notify(names: string[]): Fiber[]; trace<T>(value: T): T; bind<T extends Function>(callback: T): T; }
|
|
210
|
+
export class EventsService { }
|
|
211
|
+
export class CordisError extends Error {
|
|
212
|
+
constructor(code: string, message?: string, details?: EpisodeErrorDetails);
|
|
213
|
+
readonly code: string;
|
|
214
|
+
readonly details?: Readonly<EpisodeErrorDetails>;
|
|
215
|
+
}
|
|
216
|
+
export class ValidationError extends TypeError { }
|
|
217
|
+
export function Inject(name: string, config?: unknown): (value: any, decorator: ClassDecoratorContext | ClassMethodDecoratorContext) => void;
|
|
218
|
+
export namespace Inject { function resolve(inject?: Inject): Record<string,unknown>; }
|
|
219
|
+
export const symbols: Record<string,symbol>;
|
|
220
|
+
|
|
221
|
+
export type LoggerType = 'error' | 'info' | 'warn' | 'debug';
|
|
222
|
+
export const LoggerLevel: Readonly<{ERROR: 0; WARN: 1; INFO: 2; DEBUG: 3}>;
|
|
223
|
+
export interface Message { sn: number; ts: number; name: string; type: LoggerType; level: number; args: any[]; fiber?: WeakRef<Fiber>; }
|
|
224
|
+
export type Formatter = (value: any, exporter: Exporter, message: Message) => any;
|
|
225
|
+
export interface Exporter { colors?: number | false; maxLength?: number; levels?: Record<string, number>; formatters?: Record<string, Formatter>; export(message: Message): void; }
|
|
226
|
+
export interface LoggerOptions { name: string; meta?: Partial<Message>; level?: number; }
|
|
227
|
+
export class Logger {
|
|
228
|
+
constructor(options: LoggerOptions, service: LoggerService);
|
|
229
|
+
static color(exporter: Exporter, code: number, value: any, decoration?: string): string;
|
|
230
|
+
static code(name: string, level?: false | number): number;
|
|
231
|
+
static format(exporter: Exporter, message: Message): string;
|
|
232
|
+
name: string;
|
|
233
|
+
error(...args: any[]): void;
|
|
234
|
+
warn(...args: any[]): void;
|
|
235
|
+
info(...args: any[]): void;
|
|
236
|
+
debug(...args: any[]): void;
|
|
237
|
+
}
|
|
238
|
+
export interface LoggerService { (name?: string): Logger; }
|
|
239
|
+
export class LoggerService {
|
|
240
|
+
constructor(ctx: Context);
|
|
241
|
+
bufferSize: number;
|
|
242
|
+
buffer: Message[];
|
|
243
|
+
exporters: Map<number, Exporter>;
|
|
244
|
+
exporter(exporter: Exporter): AsyncDisposable;
|
|
245
|
+
error(...args: any[]): void;
|
|
246
|
+
warn(...args: any[]): void;
|
|
247
|
+
info(...args: any[]): void;
|
|
248
|
+
debug(...args: any[]): void;
|
|
249
|
+
}
|
|
250
|
+
export const defaultFormatters: Record<string, Formatter>;
|
|
251
|
+
export const c16: number[];
|
|
252
|
+
export const c256: number[];
|
|
253
|
+
|
|
254
|
+
/** Explicit external revision transaction; lifecycle callbacks cannot nest it. */
|
|
255
|
+
export interface MutationSteps {
|
|
256
|
+
/** True only in this live coordinator callback, never in managed observers. */
|
|
257
|
+
isCurrent(): boolean;
|
|
258
|
+
/** Run a callback with its owner's episode identity and without transaction authority. */
|
|
259
|
+
observe<T>(fiber: Fiber, execute: () => T): T extends PromiseLike<unknown> ? Promise<Awaited<T>> : T;
|
|
260
|
+
/** Join synchronous adapter lifecycle calls; authority ends before async continuation. */
|
|
261
|
+
capture<T>(execute: () => T): T;
|
|
262
|
+
dispose(fiber: Fiber): Promise<void>;
|
|
263
|
+
restart(fiber: Fiber): Promise<void>;
|
|
264
|
+
retryCleanup(fiber: Fiber): Promise<void>;
|
|
265
|
+
update(fiber: Fiber, config: any, noSave?: boolean): Awaitable<void>;
|
|
266
|
+
}
|
|
267
|
+
export function domainMutation<T>(ctx: Context, execute: (steps: Readonly<MutationSteps>) => Awaitable<T>, options?: { recovery?: boolean }): Promise<T>;
|
|
268
|
+
|
|
269
|
+
/** Check admission without queuing or changing domain state. */
|
|
270
|
+
export function assertDomainMutation(ctx: Context, options?: { recovery?: boolean }): void;
|
package/index.js
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,42 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@validation-engineering/cordis-compat-deepseek",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"description": "
|
|
6
|
-
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "Compatibility with @deepseek-ai/cordis over the Rust/Verus Cordis runtime; not the DeepSeek Harness application",
|
|
6
|
+
"engines": {
|
|
7
|
+
"node": ">=22.22.0"
|
|
8
|
+
},
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./index.d.ts",
|
|
12
|
+
"import": "./index.js",
|
|
13
|
+
"require": "./index.cjs"
|
|
14
|
+
},
|
|
15
|
+
"./register": "./register.js"
|
|
16
|
+
},
|
|
17
|
+
"peerDependencies": {
|
|
18
|
+
"@validation-engineering/cordis": "0.1.1"
|
|
19
|
+
},
|
|
20
|
+
"license": "MIT",
|
|
21
|
+
"publishConfig": {
|
|
22
|
+
"access": "public",
|
|
23
|
+
"registry": "https://registry.npmjs.org/"
|
|
24
|
+
},
|
|
25
|
+
"repository": {
|
|
26
|
+
"type": "git",
|
|
27
|
+
"url": "git+https://github.com/validation-engineering/cordis-verus.git",
|
|
28
|
+
"directory": "packages/compat-deepseek"
|
|
29
|
+
},
|
|
30
|
+
"homepage": "https://github.com/validation-engineering/cordis-verus#readme",
|
|
31
|
+
"bugs": {
|
|
32
|
+
"url": "https://github.com/validation-engineering/cordis-verus/issues"
|
|
33
|
+
},
|
|
34
|
+
"files": [
|
|
35
|
+
"*.js",
|
|
36
|
+
"*.cjs",
|
|
37
|
+
"*.d.ts",
|
|
38
|
+
"README.md",
|
|
39
|
+
"LICENSE",
|
|
40
|
+
"NOTICE"
|
|
41
|
+
]
|
|
42
|
+
}
|
package/register.js
ADDED