omnius 1.0.958 → 1.0.959

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.
@@ -0,0 +1,44 @@
1
+ import type { MemorySearchResultV1 } from "../memory/memoryCapability.js";
2
+ import type { ToolInvocationContext } from "./types.js";
3
+ import { type NativeToolOperationObservationV1 } from "./native-operation-observation.js";
4
+ /** Facts about returned records, not proof of reading their complete bodies or authoring a note. */
5
+ export interface NativeMemoryReadFacts {
6
+ readonly status: MemorySearchResultV1['status'];
7
+ readonly outcome: MemorySearchResultV1['outcome'];
8
+ readonly reasonCode?: string;
9
+ readonly returnedMatchCount: number;
10
+ readonly executedRoutes: readonly string[];
11
+ readonly sourceNamespaceCounts: Readonly<Record<string, number>>;
12
+ readonly declaredSourceKindCounts: Readonly<Record<string, number>>;
13
+ readonly sourceManifestSha256: string;
14
+ readonly authoringProof: 'none_from_read';
15
+ }
16
+ interface Carrier {
17
+ success: boolean;
18
+ output?: string;
19
+ error?: string;
20
+ llmContent?: string;
21
+ data?: unknown;
22
+ partial?: boolean;
23
+ noop?: boolean;
24
+ dryRun?: boolean;
25
+ }
26
+ /** Only observations issued from a live original memory-result reader qualify. */
27
+ export declare function readIssuedNativeMemoryOperationObservation(value: unknown): Readonly<NativeToolOperationObservationV1> | undefined;
28
+ /** Host adapter for an existing producer. No query, source access, or authority is created here. */
29
+ export declare class NativeMemoryOperationObserver {
30
+ private readonly producer;
31
+ private readonly producerRef;
32
+ private readonly carrierKey;
33
+ private readonly issued;
34
+ private readonly tickets;
35
+ constructor(producer: {
36
+ toolName: string;
37
+ readParameters: () => unknown;
38
+ readIssuedResult: (data: unknown) => MemorySearchResultV1 | undefined;
39
+ });
40
+ begin(args: Record<string, unknown>, context?: ToolInvocationContext): object | undefined;
41
+ observe(ticket: object | undefined, args: Record<string, unknown>, result: Carrier, context?: ToolInvocationContext): void;
42
+ read(args: Record<string, unknown>, result: Carrier): Readonly<NativeToolOperationObservationV1> | undefined;
43
+ }
44
+ export {};
@@ -1,3 +1,4 @@
1
+ import { type NativeMemoryReadFacts } from "./native-memory-operation-observation.js";
1
2
  export interface NativeToolOperationInvocation {
2
3
  readonly workspaceRoot: string;
3
4
  readonly sessionId: string;
@@ -25,6 +26,7 @@ export interface NativeToolOperationObservationV1 {
25
26
  /** Native producer return status, not business success, body consumption or task readiness. */
26
27
  readonly returnedStatus: 'success' | 'error';
27
28
  readonly observedAt: string;
29
+ readonly memoryRead?: Readonly<NativeMemoryReadFacts>;
28
30
  }
29
31
  /** Pure identity helper. This function cannot issue an observation or permission. */
30
32
  export declare function nativeOperationDigest(value: unknown): string;
@@ -19,7 +19,8 @@ import type { CompletionEvidenceRole, CompletionLedger, CompletionVerificationIm
19
19
  import { type ExternalEffectIntentV1, type ExternalEffectReceiptV1, type NeedsInputContractV1, type ObjectiveExternalBlockerV1, type ObjectiveFrontierDeltaV1, type ObjectiveFrontierSnapshotV1, type TaskObjectiveContractV1, type VerificationReceiptV1 } from "./taskObjective.js";
20
20
  import { PROMPT_CONTEXT_SELECTION, PROVIDER_RESPONSE_PARSER, REQUIRED_PROVIDER_SOURCES, type RequiredProviderSource, type PromptContextSelection, type ProviderContextAudit } from "./provider-context-contract.js";
21
21
  import { type TerminalTaskReport } from "./terminalTaskReport.js";
22
- import { type TerminalRuntimeFailure } from "./completionFinalization.js";
22
+ import { type NativePendingProviderDeliveryV1, type NativeProviderDeliveryAckV1 } from "./native-provider-delivery.js";
23
+ import { type CompletionFinalizationRecord, type TerminalRuntimeFailure } from "./completionFinalization.js";
23
24
  import { type CompletionReadinessSnapshot } from "./completionReadiness.js";
24
25
  import { type CompletionDeliveryReceipt, type ExpectedOutcomeAssessmentV1, type ExpectedOutcomeContractV1, type ExpectedOutcomeRequiredEffectV1 } from "./expectedOutcomeContract.js";
25
26
  import { type TodoSnapshot } from "./todoObservability.js";
@@ -419,7 +420,23 @@ export type NativeToolAttemptObservation = Readonly<{
419
420
  ownerId: string;
420
421
  ownerGeneration: number;
421
422
  }>;
423
+ /** Documented core generation limit; frontends resolve an absent setting once. */
424
+ export declare const DEFAULT_AGENTIC_MAX_TOKENS = 16384;
425
+ /** Facts read only from an original decision issued by the native frontend. */
426
+ export interface NativeInteractiveDecisionV1 {
427
+ readonly inputId: string;
428
+ readonly inputSha256: string;
429
+ readonly sessionId: string;
430
+ readonly runId: string;
431
+ readonly taskEpoch: number;
432
+ readonly ownerGeneration: number;
433
+ readonly disposition: 'independent_reply' | 'steer' | 'pause' | 'resume' | 'replace' | 'stop' | 'unresolved';
434
+ }
422
435
  export interface AgenticRunnerOptions {
436
+ /** Pinned native issuer reader. Copied decisions and checkpoint JSON grant nothing. */
437
+ readNativeInteractiveDecision?: (original: unknown) => Readonly<NativeInteractiveDecisionV1> | undefined;
438
+ /** Pinned original host ACK reader; JSON or a surface flag never supplies delivery authority. */
439
+ readNativeProviderDeliveryAck?: (original: unknown, pending: Readonly<NativePendingProviderDeliveryV1>) => Readonly<NativeProviderDeliveryAckV1> | undefined;
423
440
  /** Experimental native composition. Only an opaque host-issued fixed child policy enables it. */
424
441
  toolComposition?: HostToolCompositionPolicy;
425
442
  /** Opt-in operator audit data before context/display clipping. Never model input or completion evidence. */
@@ -1260,6 +1277,7 @@ export interface StreamChunk {
1260
1277
  promptTokens: number;
1261
1278
  completionTokens: number;
1262
1279
  totalTokens: number;
1280
+ cacheReadInputTokens?: number;
1263
1281
  costUsd?: number;
1264
1282
  };
1265
1283
  }
@@ -1371,6 +1389,8 @@ export interface RequirementReviewExhaustionV1 {
1371
1389
  workPlanSha256?: string;
1372
1390
  }
1373
1391
  export interface AgenticResult {
1392
+ /** Original nonterminal delivery ticket. Decoding/copying it grants nothing. */
1393
+ pendingProviderDelivery?: Readonly<NativePendingProviderDeliveryV1>;
1374
1394
  status: "completed" | "incomplete_verification" | "incomplete" | "awaiting_input";
1375
1395
  completed: boolean;
1376
1396
  turns: number;
@@ -1688,6 +1708,14 @@ export interface TodoReminderResult {
1688
1708
  */
1689
1709
  export declare function computeTodoReminder(input: TodoReminderInput): TodoReminderResult;
1690
1710
  export declare class AgenticRunner {
1711
+ #private;
1712
+ private readonly _readNativeInteractiveDecision?;
1713
+ private readonly _readNativeProviderDeliveryAck?;
1714
+ private readonly _nativeInteractiveDecisions;
1715
+ private readonly _issuedSteeringReplyPackets;
1716
+ private readonly _appendOnlySteeringChains;
1717
+ private _appendOnlySteeringSequence;
1718
+ private readonly _appendOnlySteeringCarriers;
1691
1719
  private backend;
1692
1720
  private tools;
1693
1721
  private options;
@@ -3871,6 +3899,10 @@ export declare class AgenticRunner {
3871
3899
  * active turn, which closes the old bridge-to-runner message-loss race.
3872
3900
  */
3873
3901
  injectSteeringInput(input: SteeringInput): SteeringIntakeReceipt;
3902
+ /** Stage a native model decision against its already admitted exact input.
3903
+ * It becomes effective only after the ordinary safe-boundary durable commit. */
3904
+ acceptNativeInteractiveDecision(original: unknown): boolean;
3905
+ private _applyNativeInteractiveDecisionsAtBoundary;
3874
3906
  /** A small communication snapshot, independent of atomic tool completion.
3875
3907
  * The full input remains in the ordinary steering and reconciliation path. */
3876
3908
  captureSteeringReply(inputId: string): {
@@ -3998,6 +4030,8 @@ export declare class AgenticRunner {
3998
4030
  /** Retract the last pending user message (Esc cancel).
3999
4031
  * Returns the retracted text, or null if queue is empty or already consumed. */
4000
4032
  retractLastPendingMessage(): string | null;
4033
+ /** Retain source/goal/effect history, revoke only this owner's live controls. */
4034
+ private _revokeInteractiveControlForStop;
4001
4035
  /** Abort the current task run through the generation-bound stop lineage. */
4002
4036
  abort(): InterruptionTransitionReceipt | null;
4003
4037
  /** Get the current abort signal for passing to fetch/spawn */
@@ -4012,6 +4046,12 @@ export declare class AgenticRunner {
4012
4046
  /** Current run identity and epoch, exposed for frontends that persist intake. */
4013
4047
  get taskEpoch(): number;
4014
4048
  get activeRunId(): string;
4049
+ private _nativeProviderDeliveryScope;
4050
+ private _stageNativeProviderDelivery;
4051
+ /** Original hot custody only. A cold/JSON ticket cannot reissue delivery or completion. */
4052
+ isCurrentPendingProviderDelivery(original: unknown): boolean;
4053
+ /** No model/tool invocation. The pinned native host issuer proves the whole delivered presentation. */
4054
+ acknowledgePendingProviderDelivery(pendingOriginal: unknown, ackOriginal: unknown): Promise<CompletionFinalizationRecord | null>;
4015
4055
  /** Detached current-owner evidence for frontend preparation decisions. */
4016
4056
  getCurrentCompletionLedgerSnapshot(): CompletionLedger | null;
4017
4057
  /** Exact admitted intake, including reconciled records and human replies;
@@ -4161,6 +4201,7 @@ export declare class AgenticRunner {
4161
4201
  private _renderSteeringResolutionNotice;
4162
4202
  /** Parse the registered control region, never a semantic textual mention. */
4163
4203
  private _reconcileActiveSteeringFromModel;
4204
+ private _commitSteeringReconciliation;
4164
4205
  /** Change only the privately owned live intake decoration after commit.
4165
4206
  * Original user turns and source/tool history remain unchanged. */
4166
4207
  private _projectResolvedSteeringIntake;
@@ -251,6 +251,8 @@ export interface CompletionLedger {
251
251
  }>;
252
252
  };
253
253
  status: CompletionLedgerStatus;
254
+ /** Durable pending custody only. Cold JSON does not restore the native ticket or ACK authority. */
255
+ pendingProviderDelivery?: import("./native-provider-delivery.js").NativeProviderDeliveryStageV1;
254
256
  /** Immutable terminal authority record used to reconcile all projections. */
255
257
  terminal?: {
256
258
  receiptId: string;
@@ -1,4 +1,5 @@
1
1
  import { type CanonicalEvidenceReceiptInput, type CanonicalTaskFrameProjection } from "./canonical-context-projection.js";
2
+ import type { NativeMemoryReadFacts } from "../execution/native-memory-operation-observation.js";
2
3
  export interface ModelFacingCanonicalMetadataProjection {
3
4
  content: string | null;
4
5
  audit: {
@@ -106,12 +107,17 @@ export interface ModelFacingOperationRepetitionFacts {
106
107
  returnedErrorCount: number;
107
108
  distinctNativeResultCount: number;
108
109
  partialOrUnavailableCount: number;
110
+ latestMemoryRead?: Readonly<NativeMemoryReadFacts>;
111
+ distinctMemorySourceManifestCount?: number;
109
112
  }
110
113
  export interface ModelFacingChildCoverage {
111
114
  status: 'available' | 'partial';
112
115
  maxWorkers: number;
113
116
  omittedObservations: number;
114
117
  }
118
+ /** Full exact accepted source, separate from changing execution observations. */
119
+ export declare const MODEL_FACING_ACCEPTED_GOAL_MARKER = "[ACCEPTED NATIVE GOAL v1]";
120
+ export declare function renderModelFacingAcceptedGoal(acceptedGoal: string): string;
115
121
  /** Explicit producer fields only; no recursive key/text stripping of source data. */
116
122
  export declare function renderModelFacingRunObservations(input: {
117
123
  acceptedGoal?: string;
@@ -132,4 +138,6 @@ export declare function renderModelFacingRunObservations(input: {
132
138
  todos?: readonly ModelFacingTodoFacts[];
133
139
  verification?: ModelFacingVerificationFacts | null;
134
140
  requirements?: readonly ModelFacingRequirementFacts[];
141
+ }, options?: {
142
+ onAcceptedGoal?: (acceptedGoal: string) => void;
135
143
  }): string | null;
@@ -0,0 +1,45 @@
1
+ import type { CompletionDeliveryReceipt } from "./expectedOutcomeContract.js";
2
+ /** Historical metadata alone never restores the original native ticket. */
3
+ export interface NativePendingProviderDeliveryV1 {
4
+ readonly schema: 'omnius.native-pending-provider-delivery.v1';
5
+ readonly id: string;
6
+ readonly sessionId: string;
7
+ readonly runId: string;
8
+ readonly taskEpoch: number;
9
+ readonly ownerId: string;
10
+ readonly ownerGeneration: number;
11
+ readonly toolCallId: string;
12
+ readonly candidateSha256: string;
13
+ readonly scopeSha256: string;
14
+ }
15
+ /** Only the constructor-pinned host reader may attest an original whole ACK. */
16
+ export interface NativeProviderDeliveryAckV1 {
17
+ readonly pending: Readonly<NativePendingProviderDeliveryV1>;
18
+ readonly candidateSha256: string;
19
+ readonly presentationSha256: string;
20
+ readonly receipts: readonly CompletionDeliveryReceipt[];
21
+ readonly assertCurrent: () => void;
22
+ }
23
+ /** Durable custody, not an issuer or a cold execution/completion grant. */
24
+ export interface NativeProviderDeliveryStageV1 {
25
+ readonly ticket: Readonly<NativePendingProviderDeliveryV1>;
26
+ readonly candidate: string;
27
+ readonly evidenceSnapshotSha256: string;
28
+ readonly effectStateSha256: string;
29
+ readonly readinessHash: string;
30
+ readonly acknowledged?: {
31
+ readonly presentationSha256: string;
32
+ readonly receipts: readonly CompletionDeliveryReceipt[];
33
+ };
34
+ }
35
+ /** A native restriction: no automatic inference/tool replay of undelivered completion custody. */
36
+ export declare class NativeProviderDeliveryHoldError extends Error {
37
+ readonly reason: 'cold_pending_delivery_unavailable' | 'pending_delivery_storage_unavailable';
38
+ readonly workspaceRoot: string;
39
+ readonly sessionId: string;
40
+ readonly runId: string;
41
+ readonly taskEpoch: number;
42
+ readonly ledgerPath?: string | undefined;
43
+ readonly code = "native_pending_provider_delivery_hold";
44
+ constructor(reason: 'cold_pending_delivery_unavailable' | 'pending_delivery_storage_unavailable', workspaceRoot: string, sessionId: string, runId: string, taskEpoch: number, ledgerPath?: string | undefined);
45
+ }
@@ -3365,11 +3365,20 @@ var init_manager = __esm({
3365
3365
  }
3366
3366
  });
3367
3367
 
3368
+ // packages/execution/dist/native-memory-operation-observation.js
3369
+ var init_native_memory_operation_observation = __esm({
3370
+ "packages/execution/dist/native-memory-operation-observation.js"() {
3371
+ "use strict";
3372
+ init_native_operation_observation();
3373
+ }
3374
+ });
3375
+
3368
3376
  // packages/execution/dist/native-operation-observation.js
3369
3377
  var init_native_operation_observation = __esm({
3370
3378
  "packages/execution/dist/native-operation-observation.js"() {
3371
3379
  "use strict";
3372
3380
  init_manager();
3381
+ init_native_memory_operation_observation();
3373
3382
  }
3374
3383
  });
3375
3384
 
@@ -248956,6 +248965,7 @@ init_system_deps();
248956
248965
 
248957
248966
  // packages/execution/dist/index.js
248958
248967
  init_native_operation_observation();
248968
+ init_native_memory_operation_observation();
248959
248969
  init_returned_http_source();
248960
248970
 
248961
248971
  // packages/execution/dist/tools/change-log.js
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
1
  [diffend] Oversized file quarantined before diffing.
2
2
  name: package/dist/index.js
3
- size: 42540230 bytes
4
- sha256: f34ed3b85f9cf0be2e8f26e6ecd77c183fe9a2095d1505bd1a565d6d030025ed
3
+ size: 42648477 bytes
4
+ sha256: b889cb72523d1ca0ace0e52cae4083a66d9104ecabe8d9e7b3ba610e626f9e8d