@ftai/dsh-plugin-acn 0.0.0-stage → 0.1.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/CHANGELOG.md +90 -0
- package/LICENSE-APACHE +201 -0
- package/LICENSE-MIT +19 -0
- package/README.md +82 -2
- package/README_EN.md +83 -0
- package/cordis.patch.yml +29 -0
- package/docs/acn-compat.md +33 -0
- package/docs/architecture.md +130 -0
- package/docs/assets/acn-claim-reuse.png +0 -0
- package/docs/assets/activity-view.png +0 -0
- package/docs/assets/install-package.png +0 -0
- package/docs/assets/knowledge-model.png +0 -0
- package/docs/assets/knowledge-view.png +0 -0
- package/docs/assets/personal-configuration.png +0 -0
- package/docs/assets/session-upstream.png +0 -0
- package/docs/assets/upstream-settings.png +0 -0
- package/docs/assets/upstream-team.png +0 -0
- package/docs/command-reference.md +201 -0
- package/docs/config.md +253 -0
- package/docs/development.md +197 -0
- package/docs/dsh-compat.md +59 -0
- package/docs/index.md +16 -0
- package/docs/outstanding-issues.md +61 -0
- package/docs/user_guide.md +185 -0
- package/icon.svg +8 -0
- package/lib/activities-B8U-iW4-.js +407 -0
- package/lib/alignment-CwH0nBf-.js +80 -0
- package/lib/auth-DFI9yowX.js +71 -0
- package/lib/checkpoint-CPFPOxBM.js +188 -0
- package/lib/checkpoint-c7aI4D-X.js +318 -0
- package/lib/claim-DOAGe8ZK.js +168 -0
- package/lib/client.js +18417 -0
- package/lib/deliver-C-dmhkfm.js +168 -0
- package/lib/delivery-status-M7-Rwoyj.js +89 -0
- package/lib/dispute-CtrInHzf.js +20 -0
- package/lib/disputes-ByEmi43j.js +51 -0
- package/lib/dream-agent-BVqxbKFc.js +249 -0
- package/lib/dream.js +4 -0
- package/lib/effects-DX1iy6FM.js +268 -0
- package/lib/errors-Bp_2WXBr.js +19 -0
- package/lib/errors-pPumDOGD.js +18 -0
- package/lib/evidence-store-DW7kj20i.js +1030 -0
- package/lib/formation-D4LO31WW.js +187 -0
- package/lib/formation-replay-Bf4TSBiz.js +87 -0
- package/lib/formation.js +9 -0
- package/lib/history-DPMHX3ZE.js +214 -0
- package/lib/inbox-2CugZZQm.js +188 -0
- package/lib/inbox-DFtE2fOp.js +71 -0
- package/lib/inbox.js +3 -0
- package/lib/index.js +1373 -0
- package/lib/lock-DbmlKOoX.js +332 -0
- package/lib/pages-BEWC3kmZ.js +51 -0
- package/lib/paths-B7NI9Ano.js +157 -0
- package/lib/plugins/commands.js +590 -0
- package/lib/plugins/dream.js +66 -0
- package/lib/plugins/formation.js +66 -0
- package/lib/plugins/inbox.js +53 -0
- package/lib/plugins/knowledge.js +1109 -0
- package/lib/plugins/prompt.js +102 -0
- package/lib/plugins/tools.js +280 -0
- package/lib/policy-DnyHh7Bl.js +16 -0
- package/lib/prepare-CGXwBEcu.js +134 -0
- package/lib/protocol.js +8 -0
- package/lib/queue-M917xHPS.js +153 -0
- package/lib/regular-file-BFpqMoub.js +136 -0
- package/lib/render-CJaVcKKC.js +48 -0
- package/lib/reported-sets-DdEKdeVb.js +122 -0
- package/lib/revision-DeoL_IUN.js +11 -0
- package/lib/scheduler-BfJSY1eq.js +64 -0
- package/lib/service-BPwaZzFF.js +1106 -0
- package/lib/service-BQaszW_v.js +344 -0
- package/lib/service-BhniAHLo.js +305 -0
- package/lib/service-C2lXoygJ.js +505 -0
- package/lib/session-binding-zCSuizHs.js +342 -0
- package/lib/session-state-CYqUhC95.js +38 -0
- package/lib/sessions-C2xuPFQv.js +218 -0
- package/lib/store.js +16 -0
- package/lib/structured-C9byFuzm.js +453 -0
- package/lib/subagent-yJsFxHmH.js +9 -0
- package/lib/team.js +3 -0
- package/lib/tool-schema-3b4gH1zf.js +28 -0
- package/lib/trace-Da0RnL5R.js +14 -0
- package/lib/traces-CHBo8y1z.js +11 -0
- package/lib/types/activities.d.ts +73 -0
- package/lib/types/advanced-configuration.d.ts +11 -0
- package/lib/types/client/ActivityCard.d.ts +14 -0
- package/lib/types/client/ActivityDetails.d.ts +18 -0
- package/lib/types/client/AdvancedPreferences.d.ts +8 -0
- package/lib/types/client/BlankCommandFeedback.d.ts +10 -0
- package/lib/types/client/ComposerMenu.d.ts +24 -0
- package/lib/types/client/ConfigurationPage.d.ts +11 -0
- package/lib/types/client/ConnectionCheckDialog.d.ts +12 -0
- package/lib/types/client/KnowledgeDetail.d.ts +6 -0
- package/lib/types/client/KnowledgeDirectoryField.d.ts +11 -0
- package/lib/types/client/KnowledgePanel.d.ts +12 -0
- package/lib/types/client/KnowledgeReference.d.ts +13 -0
- package/lib/types/client/SessionToolbar.d.ts +16 -0
- package/lib/types/client/SettingsToast.d.ts +3 -0
- package/lib/types/client/SourceSessionLink.d.ts +16 -0
- package/lib/types/client/TeamCredentialField.d.ts +16 -0
- package/lib/types/client/TeamSettingsPage.d.ts +28 -0
- package/lib/types/client/configuration-errors.d.ts +2 -0
- package/lib/types/client/interaction-styles.d.ts +1 -0
- package/lib/types/client/interaction-ui.d.ts +30 -0
- package/lib/types/client/knowledge-labels.d.ts +5 -0
- package/lib/types/client/locales.d.ts +51 -0
- package/lib/types/commands/claim.d.ts +4 -0
- package/lib/types/commands/import.d.ts +10 -0
- package/lib/types/commands/status.d.ts +5 -0
- package/lib/types/config.d.ts +111 -0
- package/lib/types/configuration.d.ts +235 -0
- package/lib/types/credentials.d.ts +59 -0
- package/lib/types/dream/audit.d.ts +4 -0
- package/lib/types/dream/autonomous.d.ts +185 -0
- package/lib/types/dream/candidates.d.ts +34 -0
- package/lib/types/dream/checkpoint.d.ts +35 -0
- package/lib/types/dream/evidence-files.d.ts +10 -0
- package/lib/types/dream/evidence-store.d.ts +103 -0
- package/lib/types/dream/evidence.d.ts +30 -0
- package/lib/types/dream/index.d.ts +10 -0
- package/lib/types/dream/plan.d.ts +18 -0
- package/lib/types/dream/preservation.d.ts +6 -0
- package/lib/types/dream/review.d.ts +10 -0
- package/lib/types/dream/schema.d.ts +1475 -0
- package/lib/types/dream/service.d.ts +56 -0
- package/lib/types/dream/sync.d.ts +147 -0
- package/lib/types/dsh-adapter/configuration-remote.d.ts +1 -0
- package/lib/types/dsh-adapter/configuration-service.d.ts +28 -0
- package/lib/types/dsh-adapter/dream-agent.d.ts +4 -0
- package/lib/types/dsh-adapter/dream-evidence.d.ts +3 -0
- package/lib/types/dsh-adapter/formation-archive.d.ts +3 -0
- package/lib/types/dsh-adapter/formation-replay.d.ts +5 -0
- package/lib/types/dsh-adapter/formation.d.ts +4 -0
- package/lib/types/dsh-adapter/interaction-service.d.ts +13 -0
- package/lib/types/dsh-adapter/knowledge-paths.d.ts +3 -0
- package/lib/types/dsh-adapter/llm.d.ts +10 -0
- package/lib/types/dsh-adapter/project-upstream.d.ts +4 -0
- package/lib/types/dsh-adapter/runtime-pool.d.ts +110 -0
- package/lib/types/dsh-adapter/session-binding.d.ts +43 -0
- package/lib/types/dsh-adapter/source-sessions.d.ts +3 -0
- package/lib/types/dsh-adapter/team-credentials.d.ts +5 -0
- package/lib/types/dsh-adapter/tool-schema.d.ts +4 -0
- package/lib/types/dsh-adapter/tools.d.ts +5 -0
- package/lib/types/formation/capture.d.ts +19 -0
- package/lib/types/formation/checkpoint.d.ts +136 -0
- package/lib/types/formation/index.d.ts +10 -0
- package/lib/types/formation/prepare.d.ts +16 -0
- package/lib/types/formation/schema.d.ts +45 -0
- package/lib/types/formation/service.d.ts +58 -0
- package/lib/types/formation/transcript.d.ts +75 -0
- package/lib/types/formation/triggers.d.ts +3 -0
- package/lib/types/inbox/cascade.d.ts +3 -0
- package/lib/types/inbox/effects.d.ts +275 -0
- package/lib/types/inbox/index.d.ts +5 -0
- package/lib/types/inbox/prepare.d.ts +380 -0
- package/lib/types/inbox/service.d.ts +26 -0
- package/lib/types/inbox/sync.d.ts +9 -0
- package/lib/types/index.d.ts +1 -0
- package/lib/types/interaction-messages.d.ts +69 -0
- package/lib/types/interaction.d.ts +541 -0
- package/lib/types/knowledge/alignment.d.ts +49 -0
- package/lib/types/knowledge/catalog.d.ts +5 -0
- package/lib/types/knowledge/changes.d.ts +32 -0
- package/lib/types/knowledge/disputes.d.ts +3 -0
- package/lib/types/knowledge/errors.d.ts +9 -0
- package/lib/types/knowledge/ordering.d.ts +7 -0
- package/lib/types/knowledge/pages.d.ts +7 -0
- package/lib/types/knowledge/safety.d.ts +2 -0
- package/lib/types/knowledge/service.d.ts +52 -0
- package/lib/types/knowledge/sessions.d.ts +59 -0
- package/lib/types/knowledge/sources.d.ts +2 -0
- package/lib/types/knowledge/timestamps.d.ts +1 -0
- package/lib/types/knowledge/types.d.ts +84 -0
- package/lib/types/llm/response.d.ts +1 -0
- package/lib/types/llm/structured.d.ts +27 -0
- package/lib/types/local-name.d.ts +1 -0
- package/lib/types/plugins/client.d.ts +9 -0
- package/lib/types/plugins/commands.d.ts +11 -0
- package/lib/types/plugins/configuration.d.ts +8 -0
- package/lib/types/plugins/dream.d.ts +16 -0
- package/lib/types/plugins/formation.d.ts +16 -0
- package/lib/types/plugins/inbox.d.ts +16 -0
- package/lib/types/plugins/knowledge.d.ts +19 -0
- package/lib/types/plugins/prompt.d.ts +17 -0
- package/lib/types/plugins/tools.d.ts +10 -0
- package/lib/types/prompt/render.d.ts +2 -0
- package/lib/types/protocol/arbitration.d.ts +154 -0
- package/lib/types/protocol/auth.d.ts +31 -0
- package/lib/types/protocol/claim.d.ts +36 -0
- package/lib/types/protocol/dispute.d.ts +17 -0
- package/lib/types/protocol/ids.d.ts +20 -0
- package/lib/types/protocol/inbox.d.ts +141 -0
- package/lib/types/protocol/index.d.ts +11 -0
- package/lib/types/protocol/policy.d.ts +21 -0
- package/lib/types/protocol/revision.d.ts +2 -0
- package/lib/types/protocol/router.d.ts +114 -0
- package/lib/types/protocol/schema.d.ts +4 -0
- package/lib/types/protocol/time.d.ts +5 -0
- package/lib/types/protocol/trace.d.ts +11 -0
- package/lib/types/store/atomic.d.ts +8 -0
- package/lib/types/store/claim-edits.d.ts +33 -0
- package/lib/types/store/claims.d.ts +7 -0
- package/lib/types/store/context.d.ts +13 -0
- package/lib/types/store/delivery-status.d.ts +48 -0
- package/lib/types/store/disputes.d.ts +6 -0
- package/lib/types/store/entities.d.ts +16 -0
- package/lib/types/store/errors.d.ts +8 -0
- package/lib/types/store/history.d.ts +65 -0
- package/lib/types/store/inbox.d.ts +27 -0
- package/lib/types/store/index.d.ts +16 -0
- package/lib/types/store/jobs.d.ts +5 -0
- package/lib/types/store/library-directory.d.ts +4 -0
- package/lib/types/store/lock.d.ts +11 -0
- package/lib/types/store/path-names.d.ts +2 -0
- package/lib/types/store/paths.d.ts +45 -0
- package/lib/types/store/presentation.d.ts +13 -0
- package/lib/types/store/regular-file.d.ts +2 -0
- package/lib/types/store/rejected-disputes.d.ts +18 -0
- package/lib/types/store/rename.d.ts +1 -0
- package/lib/types/store/reported-sets.d.ts +24 -0
- package/lib/types/store/session-state.d.ts +17 -0
- package/lib/types/store/traces.d.ts +6 -0
- package/lib/types/store/uploads.d.ts +312 -0
- package/lib/types/store/yaml.d.ts +8 -0
- package/lib/types/team/errors.d.ts +10 -0
- package/lib/types/team/http.d.ts +20 -0
- package/lib/types/team/index.d.ts +5 -0
- package/lib/types/team/maintainer-client.d.ts +18 -0
- package/lib/types/team/router-client.d.ts +14 -0
- package/lib/types/team/service.d.ts +28 -0
- package/lib/types/team/system-proxy.d.ts +9 -0
- package/lib/types/tools/claim.d.ts +63 -0
- package/lib/types/tools/consult-router.d.ts +11 -0
- package/lib/types/tools/subagent.d.ts +8 -0
- package/lib/types/tools/validation.d.ts +2 -0
- package/lib/types/upload/consolidation.d.ts +63 -0
- package/lib/types/upload/deliver.d.ts +15 -0
- package/lib/types/upload/index.d.ts +2 -0
- package/lib/types/upload/scheduler.d.ts +19 -0
- package/lib/types/upstreams.d.ts +5 -0
- package/lib/types/worker/queue.d.ts +17 -0
- package/lib/types/worker/types.d.ts +51 -0
- package/lib/types/worker/worker.d.ts +39 -0
- package/lib/types-C2ST2Zdg.js +17 -0
- package/lib/upload.js +3 -0
- package/lib/uploads-BCA2p92b.js +210 -0
- package/lib/upstreams-DEi-56tD.js +495 -0
- package/lib/worker-HMGzJFWd.js +185 -0
- package/locale/commands/en.json +1 -0
- package/locale/commands/zh.json +1 -0
- package/locale/dream/en.json +1 -0
- package/locale/dream/zh.json +1 -0
- package/locale/en.json +7 -0
- package/locale/formation/en.json +1 -0
- package/locale/formation/zh.json +1 -0
- package/locale/inbox/en.json +1 -0
- package/locale/inbox/zh.json +1 -0
- package/locale/knowledge/en.json +1 -0
- package/locale/knowledge/zh.json +1 -0
- package/locale/prompt/en.json +1 -0
- package/locale/prompt/zh.json +1 -0
- package/locale/tools/en.json +1 -0
- package/locale/tools/zh.json +1 -0
- package/locale/zh.json +7 -0
- package/package.json +262 -3
- package/prompts/claim_dream.j2 +77 -0
- package/prompts/claim_dream_legacy.j2 +63 -0
- package/prompts/dream_compaction.j2 +11 -0
- package/prompts/dream_evidence.j2 +5 -0
- package/prompts/inbox_claim_attribute_update_internalize.j2 +112 -0
- package/prompts/inbox_policy_update_internalize.j2 +87 -0
- package/prompts/knowledge.j2 +38 -0
- package/prompts/session_recap.j2 +113 -0
- package/prompts/what_is_claim.j2 +51 -0
- package/prompts/what_is_dispute.j2 +21 -0
- package/prompts/what_is_policy.j2 +22 -0
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { ResolvedConfig } from '../config.js';
|
|
2
|
+
import type { AgentId, ClaimId, TraceId } from '../protocol/ids.js';
|
|
3
|
+
import type { Claim } from '../protocol/claim.js';
|
|
4
|
+
import type { StoreContext, StoreLogger } from '../store/context.js';
|
|
5
|
+
import type { ClaimDetail, ClaimListPage, ClaimListQuery, ClaimUpdate, ClaimUpdateResult, KnowledgeVersion, TraceDetail, TraceListPage, TraceListQuery } from './types.js';
|
|
6
|
+
import { FormationStore } from '../formation/checkpoint.js';
|
|
7
|
+
import { TeamFacade } from '../team/service.js';
|
|
8
|
+
import type { TeamStatus } from '../team/service.js';
|
|
9
|
+
import type { CredentialResolver } from '../team/http.js';
|
|
10
|
+
import { DurableWorker } from '../worker/worker.js';
|
|
11
|
+
import { InboxEffectStore } from '../inbox/effects.js';
|
|
12
|
+
import { DreamStore } from '../dream/checkpoint.js';
|
|
13
|
+
export { nextClaimUpdateAt } from './timestamps.js';
|
|
14
|
+
export declare class AcnKnowledge {
|
|
15
|
+
readonly config: ResolvedConfig;
|
|
16
|
+
readonly logger: StoreLogger;
|
|
17
|
+
readonly agentId: AgentId | null;
|
|
18
|
+
readonly mode: 'solo' | 'team';
|
|
19
|
+
readonly storeContext: StoreContext | null;
|
|
20
|
+
readonly team: TeamFacade | null;
|
|
21
|
+
readonly jobs: DurableWorker | null;
|
|
22
|
+
private cache;
|
|
23
|
+
private readonly listeners;
|
|
24
|
+
constructor(config: ResolvedConfig, logger: StoreLogger, credential?: CredentialResolver);
|
|
25
|
+
get active(): boolean;
|
|
26
|
+
get configured(): boolean;
|
|
27
|
+
teamStatus(): TeamStatus;
|
|
28
|
+
context(): StoreContext;
|
|
29
|
+
initialize(): Promise<void>;
|
|
30
|
+
snapshot(signal?: AbortSignal, lockTimeoutMs?: number): Promise<{
|
|
31
|
+
claims: Claim[];
|
|
32
|
+
version: KnowledgeVersion;
|
|
33
|
+
}>;
|
|
34
|
+
knowledgeVersion(signal?: AbortSignal, lockTimeoutMs?: number): Promise<KnowledgeVersion>;
|
|
35
|
+
listClaims(query?: ClaimListQuery, signal?: AbortSignal): Promise<ClaimListPage>;
|
|
36
|
+
readClaim(id: ClaimId, signal?: AbortSignal): Promise<ClaimDetail>;
|
|
37
|
+
private readOwnedClaim;
|
|
38
|
+
updateClaim(input: ClaimUpdate, signal?: AbortSignal): Promise<ClaimUpdateResult>;
|
|
39
|
+
listTraces(query?: TraceListQuery, signal?: AbortSignal): Promise<TraceListPage>;
|
|
40
|
+
readTrace(id: TraceId, options?: {
|
|
41
|
+
taskOffset?: number;
|
|
42
|
+
taskLimit?: number;
|
|
43
|
+
}, signal?: AbortSignal): Promise<TraceDetail>;
|
|
44
|
+
onClaimsChanged(listener: (version: KnowledgeVersion) => void): () => void;
|
|
45
|
+
applyFormation(...args: Parameters<FormationStore['commit']>): ReturnType<FormationStore['commit']>;
|
|
46
|
+
applyInboxEffect(...args: Parameters<InboxEffectStore['commit']>): ReturnType<InboxEffectStore['commit']>;
|
|
47
|
+
private consistentRead;
|
|
48
|
+
private notifyChanged;
|
|
49
|
+
dreamStore(): DreamStore;
|
|
50
|
+
dreamSnapshot(signal: AbortSignal): Promise<Claim[]>;
|
|
51
|
+
applyDreamGroup(...args: Parameters<DreamStore['commitGroup']>): ReturnType<DreamStore['commitGroup']>;
|
|
52
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import type { AcnKnowledge } from './service.js';
|
|
3
|
+
import { ClaimIndexSchema } from './changes.js';
|
|
4
|
+
export declare const KnowledgeSessionStateSchema: z.ZodObject<{
|
|
5
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
6
|
+
catalog: z.ZodOptional<z.ZodObject<{
|
|
7
|
+
text: z.ZodString;
|
|
8
|
+
knowledgeVersion: z.ZodObject<{
|
|
9
|
+
claimsDigest: z.ZodString;
|
|
10
|
+
}, z.core.$strip>;
|
|
11
|
+
createdAt: z.ZodString;
|
|
12
|
+
baseline: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
13
|
+
name: z.ZodString;
|
|
14
|
+
scope: z.ZodString;
|
|
15
|
+
status: z.ZodEnum<{
|
|
16
|
+
active: "active";
|
|
17
|
+
stale: "stale";
|
|
18
|
+
deprecated: "deprecated";
|
|
19
|
+
}>;
|
|
20
|
+
revision: z.ZodString;
|
|
21
|
+
}, z.core.$strip>>;
|
|
22
|
+
}, z.core.$strip>>;
|
|
23
|
+
lastNotifiedVersion: z.ZodOptional<z.ZodObject<{
|
|
24
|
+
claimsDigest: z.ZodString;
|
|
25
|
+
}, z.core.$strip>>;
|
|
26
|
+
knownClaims: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
27
|
+
name: z.ZodString;
|
|
28
|
+
scope: z.ZodString;
|
|
29
|
+
status: z.ZodEnum<{
|
|
30
|
+
active: "active";
|
|
31
|
+
stale: "stale";
|
|
32
|
+
deprecated: "deprecated";
|
|
33
|
+
}>;
|
|
34
|
+
revision: z.ZodString;
|
|
35
|
+
}, z.core.$strip>>>;
|
|
36
|
+
seenSourceIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
37
|
+
}, z.core.$strip>;
|
|
38
|
+
export type KnowledgeSessionState = z.infer<typeof KnowledgeSessionStateSchema>;
|
|
39
|
+
export interface ChangeAdmission {
|
|
40
|
+
text: string;
|
|
41
|
+
version: {
|
|
42
|
+
claimsDigest: string;
|
|
43
|
+
};
|
|
44
|
+
knownClaims: z.infer<typeof ClaimIndexSchema>;
|
|
45
|
+
}
|
|
46
|
+
export declare class KnowledgeSessions {
|
|
47
|
+
readonly knowledge: AcnKnowledge;
|
|
48
|
+
private readonly store;
|
|
49
|
+
private readonly states;
|
|
50
|
+
private readonly writes;
|
|
51
|
+
constructor(knowledge: AcnKnowledge);
|
|
52
|
+
freeze(id: string, source: 'startup' | 'clear' | 'resume' | 'compact', parentId?: string, fetchOverview?: boolean, signal?: AbortSignal): Promise<void>;
|
|
53
|
+
catalog(id: string): string;
|
|
54
|
+
prepare(id: string, signal?: AbortSignal): Promise<ChangeAdmission | null>;
|
|
55
|
+
admitted(id: string, notice: ChangeAdmission): void;
|
|
56
|
+
flush(id?: string): Promise<void>;
|
|
57
|
+
clear(id: string): void;
|
|
58
|
+
forget(id: string): Promise<void>;
|
|
59
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function nextClaimUpdateAt(now: string, previous: string): string;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import type { Claim, Confidence, ClaimStatus } from '../protocol/claim.js';
|
|
3
|
+
import type { ClaimId, TraceId, AgentId, SourceId } from '../protocol/ids.js';
|
|
4
|
+
export declare const DEFAULT_CLAIM_LIST_LIMIT = 20;
|
|
5
|
+
export declare const MAX_CLAIM_PAGE_LIMIT = 100;
|
|
6
|
+
export declare const DEFAULT_TRACE_TASK_PAGE_LIMIT = 4000;
|
|
7
|
+
export declare const MAX_TRACE_TASK_PAGE_LIMIT = 16000;
|
|
8
|
+
export declare const ClaimUpdateSchema: z.ZodObject<{
|
|
9
|
+
id: z.core.$ZodBranded<z.ZodString, "ClaimId", "out">;
|
|
10
|
+
expected_revision: z.ZodString;
|
|
11
|
+
name: z.ZodOptional<z.ZodString>;
|
|
12
|
+
statement: z.ZodOptional<z.ZodString>;
|
|
13
|
+
scope: z.ZodOptional<z.ZodString>;
|
|
14
|
+
evidence_summary: z.ZodOptional<z.ZodString>;
|
|
15
|
+
confidence: z.ZodOptional<z.ZodEnum<{
|
|
16
|
+
high: "high";
|
|
17
|
+
medium: "medium";
|
|
18
|
+
low: "low";
|
|
19
|
+
}>>;
|
|
20
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
21
|
+
active: "active";
|
|
22
|
+
stale: "stale";
|
|
23
|
+
deprecated: "deprecated";
|
|
24
|
+
}>>;
|
|
25
|
+
}, z.core.$strict>;
|
|
26
|
+
export type ClaimUpdate = z.infer<typeof ClaimUpdateSchema>;
|
|
27
|
+
export interface BoundedText {
|
|
28
|
+
text: string;
|
|
29
|
+
truncated: boolean;
|
|
30
|
+
}
|
|
31
|
+
export interface ClaimSummary {
|
|
32
|
+
id: ClaimId;
|
|
33
|
+
name: BoundedText;
|
|
34
|
+
scope: BoundedText;
|
|
35
|
+
confidence: Confidence;
|
|
36
|
+
status: ClaimStatus;
|
|
37
|
+
updated_at: string;
|
|
38
|
+
}
|
|
39
|
+
export interface Page<T> {
|
|
40
|
+
items: T[];
|
|
41
|
+
offset: number;
|
|
42
|
+
limit: number;
|
|
43
|
+
omitted: number;
|
|
44
|
+
next_offset: number | null;
|
|
45
|
+
}
|
|
46
|
+
export type ClaimListPage = Page<ClaimSummary>;
|
|
47
|
+
export interface ClaimDetail {
|
|
48
|
+
claim: Claim;
|
|
49
|
+
revision: string;
|
|
50
|
+
}
|
|
51
|
+
export interface ClaimUpdateResult extends ClaimDetail {
|
|
52
|
+
sync_warning?: string;
|
|
53
|
+
sync_pending: boolean;
|
|
54
|
+
}
|
|
55
|
+
export interface TraceSummary {
|
|
56
|
+
id: TraceId;
|
|
57
|
+
name: string;
|
|
58
|
+
created_at: string;
|
|
59
|
+
input_claims: SourceId[];
|
|
60
|
+
output_claims: ClaimId[];
|
|
61
|
+
}
|
|
62
|
+
export type TraceListPage = Page<TraceSummary>;
|
|
63
|
+
export interface TraceDetail extends TraceSummary {
|
|
64
|
+
agent: AgentId;
|
|
65
|
+
task: string;
|
|
66
|
+
task_offset: number;
|
|
67
|
+
task_limit: number;
|
|
68
|
+
task_omitted: number;
|
|
69
|
+
next_task_offset: number | null;
|
|
70
|
+
}
|
|
71
|
+
export interface ClaimListQuery {
|
|
72
|
+
query?: string;
|
|
73
|
+
includeDeprecated?: boolean;
|
|
74
|
+
offset?: number;
|
|
75
|
+
limit?: number;
|
|
76
|
+
}
|
|
77
|
+
export interface TraceListQuery {
|
|
78
|
+
claimId?: ClaimId;
|
|
79
|
+
offset?: number;
|
|
80
|
+
limit?: number;
|
|
81
|
+
}
|
|
82
|
+
export interface KnowledgeVersion {
|
|
83
|
+
claimsDigest: string;
|
|
84
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function structuredResponseText(text: string): string;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import type { ResolvedConfig } from '../config.js';
|
|
3
|
+
import type { StoreContext } from '../store/context.js';
|
|
4
|
+
import { JobError } from '../worker/types.js';
|
|
5
|
+
import type { Route } from '../formation/transcript.js';
|
|
6
|
+
export interface StructuredResponse {
|
|
7
|
+
text: string;
|
|
8
|
+
usage?: object;
|
|
9
|
+
}
|
|
10
|
+
export type StructuredPhase = 'candidates' | 'draft' | 'review' | 'sync_review' | 'compaction';
|
|
11
|
+
export type StructuredBackend = (route: Route, system: string, input: string, maxTokens: number, signal: AbortSignal) => Promise<StructuredResponse>;
|
|
12
|
+
export declare function abortable<T>(promise: Promise<T>, signal: AbortSignal): Promise<T>;
|
|
13
|
+
export declare function resolveRoute(config: ResolvedConfig['llm'], context: StoreContext, sessionRoute?: Route): Promise<Route>;
|
|
14
|
+
export declare function transportError(error: unknown): JobError;
|
|
15
|
+
export declare function structuredCall<T>(options: {
|
|
16
|
+
backend: StructuredBackend;
|
|
17
|
+
context: StoreContext;
|
|
18
|
+
config: ResolvedConfig['llm'];
|
|
19
|
+
route: Route;
|
|
20
|
+
jobId: string;
|
|
21
|
+
system: string;
|
|
22
|
+
input: string;
|
|
23
|
+
schema: z.ZodType;
|
|
24
|
+
parse(value: unknown): T;
|
|
25
|
+
signal: AbortSignal;
|
|
26
|
+
phase?: StructuredPhase;
|
|
27
|
+
}): Promise<T>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function portableLocalName(value: string): boolean;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
2
|
+
import type { ConfigurationText } from '../client/locales.js';
|
|
3
|
+
declare module '@deepseek-ai/dsh-client-ui-slots' {
|
|
4
|
+
interface LocaleNamespaceMap {
|
|
5
|
+
'acn.configuration': ConfigurationText;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
export declare const inject: string[];
|
|
9
|
+
export declare function apply(ctx: Context): Promise<void>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
2
|
+
export { importCommand } from '../commands/import.js';
|
|
3
|
+
export declare const name = "acn-commands";
|
|
4
|
+
export declare const inject: string[];
|
|
5
|
+
export declare function apply(ctx: Context): void;
|
|
6
|
+
declare const _default: {
|
|
7
|
+
name: string;
|
|
8
|
+
inject: string[];
|
|
9
|
+
apply: typeof apply;
|
|
10
|
+
};
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
2
|
+
import { AcnDream } from '../dream/service.js';
|
|
3
|
+
declare module '@deepseek-ai/cordis' {
|
|
4
|
+
interface Context {
|
|
5
|
+
acnDream: AcnDream;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
export declare const name = "acn-dream";
|
|
9
|
+
export declare const inject: string[];
|
|
10
|
+
export declare function apply(ctx: Context): Promise<void>;
|
|
11
|
+
declare const _default: {
|
|
12
|
+
name: string;
|
|
13
|
+
inject: string[];
|
|
14
|
+
apply: typeof apply;
|
|
15
|
+
};
|
|
16
|
+
export default _default;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
2
|
+
import { AcnFormation } from '../formation/service.js';
|
|
3
|
+
declare module '@deepseek-ai/cordis' {
|
|
4
|
+
interface Context {
|
|
5
|
+
acnFormation: AcnFormation;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
export declare const name = "acn-formation";
|
|
9
|
+
export declare const inject: string[];
|
|
10
|
+
export declare function apply(ctx: Context): Promise<void>;
|
|
11
|
+
declare const _default: {
|
|
12
|
+
name: string;
|
|
13
|
+
inject: string[];
|
|
14
|
+
apply: typeof apply;
|
|
15
|
+
};
|
|
16
|
+
export default _default;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
2
|
+
import { AcnInbox } from '../inbox/service.js';
|
|
3
|
+
declare module '@deepseek-ai/cordis' {
|
|
4
|
+
interface Context {
|
|
5
|
+
acnInbox: AcnInbox;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
export declare const name = "acn-inbox";
|
|
9
|
+
export declare const inject: string[];
|
|
10
|
+
export declare function apply(ctx: Context): Promise<void>;
|
|
11
|
+
declare const _default: {
|
|
12
|
+
name: string;
|
|
13
|
+
inject: string[];
|
|
14
|
+
apply: typeof apply;
|
|
15
|
+
};
|
|
16
|
+
export default _default;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
2
|
+
import Schema from '@deepseek-ai/schemastery';
|
|
3
|
+
import { AcnKnowledge } from '../knowledge/service.js';
|
|
4
|
+
declare module '@deepseek-ai/cordis' {
|
|
5
|
+
interface Context {
|
|
6
|
+
acnKnowledge: AcnKnowledge;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
export declare const name = "acn-knowledge";
|
|
10
|
+
export declare const inject: string[];
|
|
11
|
+
export declare const Config: Schema;
|
|
12
|
+
export declare function apply(ctx: Context, input?: unknown): Promise<void>;
|
|
13
|
+
declare const _default: {
|
|
14
|
+
name: string;
|
|
15
|
+
Config: Schema;
|
|
16
|
+
inject: string[];
|
|
17
|
+
apply: typeof apply;
|
|
18
|
+
};
|
|
19
|
+
export default _default;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
2
|
+
declare module '@deepseek-ai/dsh-llm' {
|
|
3
|
+
interface MessageSourceMap {
|
|
4
|
+
'acn-claim-changes': {
|
|
5
|
+
kind: 'acn-claim-changes';
|
|
6
|
+
};
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
export declare const name = "acn-prompt";
|
|
10
|
+
export declare const inject: string[];
|
|
11
|
+
export declare function apply(ctx: Context): Promise<void>;
|
|
12
|
+
declare const _default: {
|
|
13
|
+
name: string;
|
|
14
|
+
inject: string[];
|
|
15
|
+
apply: typeof apply;
|
|
16
|
+
};
|
|
17
|
+
export default _default;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
2
|
+
export declare const name = "acn-tools";
|
|
3
|
+
export declare const inject: string[];
|
|
4
|
+
export declare function apply(ctx: Context): void;
|
|
5
|
+
declare const _default: {
|
|
6
|
+
name: string;
|
|
7
|
+
inject: string[];
|
|
8
|
+
apply: typeof apply;
|
|
9
|
+
};
|
|
10
|
+
export default _default;
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const ClaimAssessmentSchema: z.ZodObject<{
|
|
3
|
+
claim_id: z.core.$ZodBranded<z.ZodString, "ClaimId", "out">;
|
|
4
|
+
recommended_status: z.ZodEnum<{
|
|
5
|
+
active: "active";
|
|
6
|
+
stale: "stale";
|
|
7
|
+
deprecated: "deprecated";
|
|
8
|
+
}>;
|
|
9
|
+
assessment: z.ZodString;
|
|
10
|
+
recommended_scope: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
|
|
11
|
+
recommended_statement: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
|
|
12
|
+
reason: z.ZodString;
|
|
13
|
+
}, z.core.$strip>;
|
|
14
|
+
export declare const DisputeResolutionSchema: z.ZodPreprocess<z.ZodObject<{
|
|
15
|
+
resolution_id: z.core.$ZodBranded<z.ZodString, "ResolutionId", "out">;
|
|
16
|
+
resolved_by: z.ZodEnum<{
|
|
17
|
+
human: "human";
|
|
18
|
+
automatic: "automatic";
|
|
19
|
+
}>;
|
|
20
|
+
resolved_at: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
21
|
+
resolution_type: z.ZodPreprocess<z.ZodOptional<z.ZodEnum<{
|
|
22
|
+
coexist: "coexist";
|
|
23
|
+
lifecycle_update: "lifecycle_update";
|
|
24
|
+
conflict_resolved: "conflict_resolved";
|
|
25
|
+
unresolved: "unresolved";
|
|
26
|
+
}>>>;
|
|
27
|
+
resolution_basis: z.ZodPreprocess<z.ZodOptional<z.ZodEnum<{
|
|
28
|
+
evidence: "evidence";
|
|
29
|
+
insufficient_evidence: "insufficient_evidence";
|
|
30
|
+
direct_analysis: "direct_analysis";
|
|
31
|
+
prior_resolution: "prior_resolution";
|
|
32
|
+
policy: "policy";
|
|
33
|
+
}>>>;
|
|
34
|
+
conclusion: z.ZodString;
|
|
35
|
+
claim_assessments: z.ZodPipe<z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
36
|
+
claim_id: z.core.$ZodBranded<z.ZodString, "ClaimId", "out">;
|
|
37
|
+
recommended_status: z.ZodEnum<{
|
|
38
|
+
active: "active";
|
|
39
|
+
stale: "stale";
|
|
40
|
+
deprecated: "deprecated";
|
|
41
|
+
}>;
|
|
42
|
+
assessment: z.ZodString;
|
|
43
|
+
recommended_scope: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
|
|
44
|
+
recommended_statement: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
|
|
45
|
+
reason: z.ZodString;
|
|
46
|
+
}, z.core.$strip>>>, z.ZodTransform<{
|
|
47
|
+
claim_id: string & z.core.$brand<"ClaimId">;
|
|
48
|
+
recommended_status: "active" | "stale" | "deprecated";
|
|
49
|
+
assessment: string;
|
|
50
|
+
reason: string;
|
|
51
|
+
recommended_scope?: string | undefined;
|
|
52
|
+
recommended_statement?: string | undefined;
|
|
53
|
+
}[] | undefined, {
|
|
54
|
+
claim_id: string & z.core.$brand<"ClaimId">;
|
|
55
|
+
recommended_status: "active" | "stale" | "deprecated";
|
|
56
|
+
assessment: string;
|
|
57
|
+
reason: string;
|
|
58
|
+
recommended_scope?: string | undefined;
|
|
59
|
+
recommended_statement?: string | undefined;
|
|
60
|
+
}[]>>;
|
|
61
|
+
rejection_reason: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
|
|
62
|
+
}, z.core.$strip>>;
|
|
63
|
+
export declare const ArbitrationResolutionContextSchema: z.ZodPreprocess<z.ZodObject<{
|
|
64
|
+
context_snapshot_hash: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
|
|
65
|
+
dispute_snapshot: z.ZodObject<{
|
|
66
|
+
id: z.core.$ZodBranded<z.ZodString, "DisputeId", "out">;
|
|
67
|
+
name: z.ZodString;
|
|
68
|
+
reporter_agent_id: z.ZodDefault<z.core.$ZodBranded<z.ZodString, "AgentId", "out">>;
|
|
69
|
+
claims: z.ZodArray<z.core.$ZodBranded<z.ZodString, "ClaimId", "out">>;
|
|
70
|
+
summary: z.ZodString;
|
|
71
|
+
status: z.ZodEnum<{
|
|
72
|
+
open: "open";
|
|
73
|
+
resolved: "resolved";
|
|
74
|
+
}>;
|
|
75
|
+
created_at: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
76
|
+
resolved_at: z.ZodPreprocess<z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
|
|
77
|
+
}, z.core.$strip>;
|
|
78
|
+
direct_claim_snapshots: z.ZodArray<z.ZodObject<{
|
|
79
|
+
id: z.core.$ZodBranded<z.ZodString, "ClaimId", "out">;
|
|
80
|
+
name: z.ZodString;
|
|
81
|
+
statement: z.ZodString;
|
|
82
|
+
scope: z.ZodString;
|
|
83
|
+
holder: z.core.$ZodBranded<z.ZodString, "AgentId", "out">;
|
|
84
|
+
confidence: z.ZodEnum<{
|
|
85
|
+
high: "high";
|
|
86
|
+
medium: "medium";
|
|
87
|
+
low: "low";
|
|
88
|
+
}>;
|
|
89
|
+
status: z.ZodEnum<{
|
|
90
|
+
active: "active";
|
|
91
|
+
stale: "stale";
|
|
92
|
+
deprecated: "deprecated";
|
|
93
|
+
}>;
|
|
94
|
+
created_at: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
95
|
+
updated_at: z.ZodPreprocess<z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
|
|
96
|
+
source_claim_ids: z.ZodDefault<z.ZodArray<z.ZodUnion<readonly [z.core.$ZodBranded<z.ZodString, "ClaimId", "out">, z.core.$ZodBranded<z.ZodString, "PolicyId", "out">]>>>;
|
|
97
|
+
evidence_summary: z.ZodString;
|
|
98
|
+
}, z.core.$strip>>;
|
|
99
|
+
snapshot_source_resolution_id: z.ZodPreprocess<z.ZodOptional<z.core.$ZodBranded<z.ZodString, "ResolutionId", "out">>>;
|
|
100
|
+
resolution_id: z.core.$ZodBranded<z.ZodString, "ResolutionId", "out">;
|
|
101
|
+
resolved_by: z.ZodEnum<{
|
|
102
|
+
human: "human";
|
|
103
|
+
automatic: "automatic";
|
|
104
|
+
}>;
|
|
105
|
+
resolved_at: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
106
|
+
resolution_type: z.ZodPreprocess<z.ZodOptional<z.ZodEnum<{
|
|
107
|
+
coexist: "coexist";
|
|
108
|
+
lifecycle_update: "lifecycle_update";
|
|
109
|
+
conflict_resolved: "conflict_resolved";
|
|
110
|
+
unresolved: "unresolved";
|
|
111
|
+
}>>>;
|
|
112
|
+
resolution_basis: z.ZodPreprocess<z.ZodOptional<z.ZodEnum<{
|
|
113
|
+
evidence: "evidence";
|
|
114
|
+
insufficient_evidence: "insufficient_evidence";
|
|
115
|
+
direct_analysis: "direct_analysis";
|
|
116
|
+
prior_resolution: "prior_resolution";
|
|
117
|
+
policy: "policy";
|
|
118
|
+
}>>>;
|
|
119
|
+
conclusion: z.ZodString;
|
|
120
|
+
claim_assessments: z.ZodPipe<z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
121
|
+
claim_id: z.core.$ZodBranded<z.ZodString, "ClaimId", "out">;
|
|
122
|
+
recommended_status: z.ZodEnum<{
|
|
123
|
+
active: "active";
|
|
124
|
+
stale: "stale";
|
|
125
|
+
deprecated: "deprecated";
|
|
126
|
+
}>;
|
|
127
|
+
assessment: z.ZodString;
|
|
128
|
+
recommended_scope: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
|
|
129
|
+
recommended_statement: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
|
|
130
|
+
reason: z.ZodString;
|
|
131
|
+
}, z.core.$strip>>>, z.ZodTransform<{
|
|
132
|
+
claim_id: string & z.core.$brand<"ClaimId">;
|
|
133
|
+
recommended_status: "active" | "stale" | "deprecated";
|
|
134
|
+
assessment: string;
|
|
135
|
+
reason: string;
|
|
136
|
+
recommended_scope?: string | undefined;
|
|
137
|
+
recommended_statement?: string | undefined;
|
|
138
|
+
}[] | undefined, {
|
|
139
|
+
claim_id: string & z.core.$brand<"ClaimId">;
|
|
140
|
+
recommended_status: "active" | "stale" | "deprecated";
|
|
141
|
+
assessment: string;
|
|
142
|
+
reason: string;
|
|
143
|
+
recommended_scope?: string | undefined;
|
|
144
|
+
recommended_statement?: string | undefined;
|
|
145
|
+
}[]>>;
|
|
146
|
+
rejection_reason: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
|
|
147
|
+
dispute_id: z.core.$ZodBranded<z.ZodString, "DisputeId", "out">;
|
|
148
|
+
}, z.core.$loose>>;
|
|
149
|
+
export type ArbitrationResolutionContext = z.infer<typeof ArbitrationResolutionContextSchema>;
|
|
150
|
+
export type ClaimAssessment = z.infer<typeof ClaimAssessmentSchema>;
|
|
151
|
+
export type DisputeResolution = z.infer<typeof DisputeResolutionSchema>;
|
|
152
|
+
export type ResolutionType = NonNullable<DisputeResolution['resolution_type']>;
|
|
153
|
+
export type ResolutionBasis = NonNullable<DisputeResolution['resolution_basis']>;
|
|
154
|
+
export type ResolvedBy = DisputeResolution['resolved_by'];
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const AuthEnvelopeSchema: z.ZodObject<{
|
|
3
|
+
agent_id: z.core.$ZodBranded<z.ZodString, "AgentId", "out">;
|
|
4
|
+
acn_key: z.ZodString;
|
|
5
|
+
}, z.core.$strict>;
|
|
6
|
+
export declare const authRequestSchema: <T extends z.ZodType>(data: T) => z.ZodObject<{
|
|
7
|
+
auth: z.ZodObject<{
|
|
8
|
+
agent_id: z.core.$ZodBranded<z.ZodString, "AgentId", "out">;
|
|
9
|
+
acn_key: z.ZodString;
|
|
10
|
+
}, z.core.$strict>;
|
|
11
|
+
data: T;
|
|
12
|
+
}, z.core.$strict>;
|
|
13
|
+
export declare const HealthRequestSchema: z.ZodObject<{
|
|
14
|
+
auth: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
15
|
+
agent_id: z.core.$ZodBranded<z.ZodString, "AgentId", "out">;
|
|
16
|
+
acn_key: z.ZodString;
|
|
17
|
+
}, z.core.$strict>>>;
|
|
18
|
+
data: z.ZodDefault<z.ZodObject<{}, z.core.$strict>>;
|
|
19
|
+
}, z.core.$strict>;
|
|
20
|
+
export declare const HealthResponseSchema: z.ZodObject<{
|
|
21
|
+
status: z.ZodString;
|
|
22
|
+
team_auth_enabled: z.ZodBoolean;
|
|
23
|
+
auth_passed: z.ZodOptional<z.ZodBoolean>;
|
|
24
|
+
}, z.core.$strip>;
|
|
25
|
+
export type AuthEnvelope = z.infer<typeof AuthEnvelopeSchema>;
|
|
26
|
+
export interface AuthRequest<T> {
|
|
27
|
+
auth: AuthEnvelope;
|
|
28
|
+
data: T;
|
|
29
|
+
}
|
|
30
|
+
export type HealthRequest = z.infer<typeof HealthRequestSchema>;
|
|
31
|
+
export type HealthResponse = z.infer<typeof HealthResponseSchema>;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const ConfidenceSchema: z.ZodEnum<{
|
|
3
|
+
high: "high";
|
|
4
|
+
medium: "medium";
|
|
5
|
+
low: "low";
|
|
6
|
+
}>;
|
|
7
|
+
export declare const ClaimStatusSchema: z.ZodEnum<{
|
|
8
|
+
active: "active";
|
|
9
|
+
stale: "stale";
|
|
10
|
+
deprecated: "deprecated";
|
|
11
|
+
}>;
|
|
12
|
+
export declare const ClaimSchema: z.ZodObject<{
|
|
13
|
+
id: z.core.$ZodBranded<z.ZodString, "ClaimId", "out">;
|
|
14
|
+
name: z.ZodString;
|
|
15
|
+
statement: z.ZodString;
|
|
16
|
+
scope: z.ZodString;
|
|
17
|
+
holder: z.core.$ZodBranded<z.ZodString, "AgentId", "out">;
|
|
18
|
+
confidence: z.ZodEnum<{
|
|
19
|
+
high: "high";
|
|
20
|
+
medium: "medium";
|
|
21
|
+
low: "low";
|
|
22
|
+
}>;
|
|
23
|
+
status: z.ZodEnum<{
|
|
24
|
+
active: "active";
|
|
25
|
+
stale: "stale";
|
|
26
|
+
deprecated: "deprecated";
|
|
27
|
+
}>;
|
|
28
|
+
created_at: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
29
|
+
updated_at: z.ZodPreprocess<z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
|
|
30
|
+
source_claim_ids: z.ZodDefault<z.ZodArray<z.ZodUnion<readonly [z.core.$ZodBranded<z.ZodString, "ClaimId", "out">, z.core.$ZodBranded<z.ZodString, "PolicyId", "out">]>>>;
|
|
31
|
+
evidence_summary: z.ZodString;
|
|
32
|
+
}, z.core.$strip>;
|
|
33
|
+
export type Claim = z.infer<typeof ClaimSchema>;
|
|
34
|
+
export type Confidence = z.infer<typeof ConfidenceSchema>;
|
|
35
|
+
export type ClaimStatus = z.infer<typeof ClaimStatusSchema>;
|
|
36
|
+
export declare const effectiveUpdatedAt: (claim: Claim) => string;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const DisputeSchema: z.ZodObject<{
|
|
3
|
+
id: z.core.$ZodBranded<z.ZodString, "DisputeId", "out">;
|
|
4
|
+
name: z.ZodString;
|
|
5
|
+
reporter_agent_id: z.ZodDefault<z.core.$ZodBranded<z.ZodString, "AgentId", "out">>;
|
|
6
|
+
claims: z.ZodArray<z.core.$ZodBranded<z.ZodString, "ClaimId", "out">>;
|
|
7
|
+
summary: z.ZodString;
|
|
8
|
+
status: z.ZodEnum<{
|
|
9
|
+
open: "open";
|
|
10
|
+
resolved: "resolved";
|
|
11
|
+
}>;
|
|
12
|
+
created_at: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
13
|
+
resolved_at: z.ZodPreprocess<z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
|
|
14
|
+
}, z.core.$strip>;
|
|
15
|
+
export type Dispute = z.infer<typeof DisputeSchema>;
|
|
16
|
+
export type DisputeStatus = Dispute['status'];
|
|
17
|
+
export declare function validateAgentReport(value: unknown): Dispute;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const AgentIdSchema: z.core.$ZodBranded<z.ZodString, "AgentId", "out">;
|
|
3
|
+
export declare const ClaimIdSchema: z.core.$ZodBranded<z.ZodString, "ClaimId", "out">;
|
|
4
|
+
export declare const TraceIdSchema: z.core.$ZodBranded<z.ZodString, "TraceId", "out">;
|
|
5
|
+
export declare const DisputeIdSchema: z.core.$ZodBranded<z.ZodString, "DisputeId", "out">;
|
|
6
|
+
export declare const PolicyIdSchema: z.core.$ZodBranded<z.ZodString, "PolicyId", "out">;
|
|
7
|
+
export declare const InboxIdSchema: z.core.$ZodBranded<z.ZodString, "InboxId", "out">;
|
|
8
|
+
export declare const ResolutionIdSchema: z.core.$ZodBranded<z.ZodString, "ResolutionId", "out">;
|
|
9
|
+
export declare const SourceIdSchema: z.ZodUnion<readonly [z.core.$ZodBranded<z.ZodString, "ClaimId", "out">, z.core.$ZodBranded<z.ZodString, "PolicyId", "out">]>;
|
|
10
|
+
export type AgentId = z.infer<typeof AgentIdSchema>;
|
|
11
|
+
export type ClaimId = z.infer<typeof ClaimIdSchema>;
|
|
12
|
+
export type TraceId = z.infer<typeof TraceIdSchema>;
|
|
13
|
+
export type DisputeId = z.infer<typeof DisputeIdSchema>;
|
|
14
|
+
export type InboxId = z.infer<typeof InboxIdSchema>;
|
|
15
|
+
export type PolicyId = z.infer<typeof PolicyIdSchema>;
|
|
16
|
+
export type ResolutionId = z.infer<typeof ResolutionIdSchema>;
|
|
17
|
+
export type SourceId = z.infer<typeof SourceIdSchema>;
|
|
18
|
+
export declare function deriveClaimId(createdAt: string, name: string, scope: string, salt?: string): ClaimId;
|
|
19
|
+
export declare function deriveTraceId(createdAt: string, name: string, inputs: readonly string[], outputs: readonly string[], salt?: string): TraceId;
|
|
20
|
+
export declare function deriveDisputeId(createdAt: string, name: string, claims: readonly string[], summary: string, salt?: string): DisputeId;
|