paseo-agy-acp 2.2.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/CHANGELOG.md +296 -0
- package/LICENSE +201 -0
- package/README.md +571 -0
- package/README.zh-CN.md +540 -0
- package/assets/official-kernel-compat/rc01/paseo_model_compat.py +172 -0
- package/dist/ACP Connector/acp/session/paseo-context.d.ts +6 -0
- package/dist/ACP Connector/acp/session/paseo-context.js +83 -0
- package/dist/ACP Connector/acp/session/paseo-context.js.map +1 -0
- package/dist/ACP Connector/acp/session/turn-scheduler.d.ts +90 -0
- package/dist/ACP Connector/acp/session/turn-scheduler.js +247 -0
- package/dist/ACP Connector/acp/session/turn-scheduler.js.map +1 -0
- package/dist/ACP Connector/admission/dispatch-boundary.d.ts +19 -0
- package/dist/ACP Connector/admission/dispatch-boundary.js +16 -0
- package/dist/ACP Connector/admission/dispatch-boundary.js.map +1 -0
- package/dist/ACP Connector/admission/errors.d.ts +18 -0
- package/dist/ACP Connector/admission/errors.js +46 -0
- package/dist/ACP Connector/admission/errors.js.map +1 -0
- package/dist/ACP Connector/admission/owner-instance.d.ts +31 -0
- package/dist/ACP Connector/admission/owner-instance.js +105 -0
- package/dist/ACP Connector/admission/owner-instance.js.map +1 -0
- package/dist/ACP Connector/admission/runtime.d.ts +20 -0
- package/dist/ACP Connector/admission/runtime.js +157 -0
- package/dist/ACP Connector/admission/runtime.js.map +1 -0
- package/dist/ACP Connector/admission/startup-recovery.d.ts +22 -0
- package/dist/ACP Connector/admission/startup-recovery.js +129 -0
- package/dist/ACP Connector/admission/startup-recovery.js.map +1 -0
- package/dist/ACP Connector/admission/turn-coordinator.d.ts +57 -0
- package/dist/ACP Connector/admission/turn-coordinator.js +369 -0
- package/dist/ACP Connector/admission/turn-coordinator.js.map +1 -0
- package/dist/ACP Connector/agent.d.ts +4 -0
- package/dist/ACP Connector/agent.js +6 -0
- package/dist/ACP Connector/agent.js.map +1 -0
- package/dist/ACP Connector/main.d.ts +2 -0
- package/dist/ACP Connector/main.js +31 -0
- package/dist/ACP Connector/main.js.map +1 -0
- package/dist/ACP Connector/official-kernel/admission-fence.d.ts +10 -0
- package/dist/ACP Connector/official-kernel/admission-fence.js +52 -0
- package/dist/ACP Connector/official-kernel/admission-fence.js.map +1 -0
- package/dist/ACP Connector/official-kernel/context.d.ts +3 -0
- package/dist/ACP Connector/official-kernel/context.js +52 -0
- package/dist/ACP Connector/official-kernel/context.js.map +1 -0
- package/dist/ACP Connector/official-kernel/errors.d.ts +5 -0
- package/dist/ACP Connector/official-kernel/errors.js +39 -0
- package/dist/ACP Connector/official-kernel/errors.js.map +1 -0
- package/dist/ACP Connector/official-kernel/identity.d.ts +3 -0
- package/dist/ACP Connector/official-kernel/identity.js +17 -0
- package/dist/ACP Connector/official-kernel/identity.js.map +1 -0
- package/dist/ACP Connector/official-kernel/json-rpc.d.ts +34 -0
- package/dist/ACP Connector/official-kernel/json-rpc.js +26 -0
- package/dist/ACP Connector/official-kernel/json-rpc.js.map +1 -0
- package/dist/ACP Connector/official-kernel/kernel-compat-lifecycle.d.ts +115 -0
- package/dist/ACP Connector/official-kernel/kernel-compat-lifecycle.js +1904 -0
- package/dist/ACP Connector/official-kernel/kernel-compat-lifecycle.js.map +1 -0
- package/dist/ACP Connector/official-kernel/kernel-compat-pins.d.ts +14 -0
- package/dist/ACP Connector/official-kernel/kernel-compat-pins.js +29 -0
- package/dist/ACP Connector/official-kernel/kernel-compat-pins.js.map +1 -0
- package/dist/ACP Connector/official-kernel/kernel-compat-rc01-recipe.d.ts +2 -0
- package/dist/ACP Connector/official-kernel/kernel-compat-rc01-recipe.js +32 -0
- package/dist/ACP Connector/official-kernel/kernel-compat-rc01-recipe.js.map +1 -0
- package/dist/ACP Connector/official-kernel/kernel.d.ts +3 -0
- package/dist/ACP Connector/official-kernel/kernel.js +12 -0
- package/dist/ACP Connector/official-kernel/kernel.js.map +1 -0
- package/dist/ACP Connector/official-kernel/login.d.ts +1 -0
- package/dist/ACP Connector/official-kernel/login.js +73 -0
- package/dist/ACP Connector/official-kernel/login.js.map +1 -0
- package/dist/ACP Connector/official-kernel/mcp-rewrite.d.ts +1 -0
- package/dist/ACP Connector/official-kernel/mcp-rewrite.js +39 -0
- package/dist/ACP Connector/official-kernel/mcp-rewrite.js.map +1 -0
- package/dist/ACP Connector/official-kernel/mode-map.d.ts +5 -0
- package/dist/ACP Connector/official-kernel/mode-map.js +35 -0
- package/dist/ACP Connector/official-kernel/mode-map.js.map +1 -0
- package/dist/ACP Connector/official-kernel/ndjson.d.ts +3 -0
- package/dist/ACP Connector/official-kernel/ndjson.js +29 -0
- package/dist/ACP Connector/official-kernel/ndjson.js.map +1 -0
- package/dist/ACP Connector/official-kernel/proxy.d.ts +14 -0
- package/dist/ACP Connector/official-kernel/proxy.js +197 -0
- package/dist/ACP Connector/official-kernel/proxy.js.map +1 -0
- package/dist/ACP Connector/official-kernel/run.d.ts +8 -0
- package/dist/ACP Connector/official-kernel/run.js +22 -0
- package/dist/ACP Connector/official-kernel/run.js.map +1 -0
- package/dist/ACP Connector/official-kernel/spawn.d.ts +5 -0
- package/dist/ACP Connector/official-kernel/spawn.js +33 -0
- package/dist/ACP Connector/official-kernel/spawn.js.map +1 -0
- package/dist/Admission Controller/controller.d.ts +338 -0
- package/dist/Admission Controller/controller.js +2089 -0
- package/dist/Admission Controller/controller.js.map +1 -0
- package/dist/Admission Controller/key-derivation.d.ts +24 -0
- package/dist/Admission Controller/key-derivation.js +141 -0
- package/dist/Admission Controller/key-derivation.js.map +1 -0
- package/dist/Admission Controller/key-store.d.ts +8 -0
- package/dist/Admission Controller/key-store.js +280 -0
- package/dist/Admission Controller/key-store.js.map +1 -0
- package/dist/Admission Controller/policy-limits.d.ts +6 -0
- package/dist/Admission Controller/policy-limits.js +11 -0
- package/dist/Admission Controller/policy-limits.js.map +1 -0
- package/dist/Admission Controller/process-evidence.d.ts +111 -0
- package/dist/Admission Controller/process-evidence.js +549 -0
- package/dist/Admission Controller/process-evidence.js.map +1 -0
- package/dist/Admission Controller/runtime-config.d.ts +23 -0
- package/dist/Admission Controller/runtime-config.js +86 -0
- package/dist/Admission Controller/runtime-config.js.map +1 -0
- package/dist/Admission Controller/schema.d.ts +12 -0
- package/dist/Admission Controller/schema.js +422 -0
- package/dist/Admission Controller/schema.js.map +1 -0
- package/package.json +72 -0
- package/scripts/prepare-admission-state-dir.mjs +62 -0
- package/scripts/prepare-official-kernel-compat.mjs +387 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { isRecord } from "./json-rpc.js";
|
|
2
|
+
export const PRODUCT_AGENT_NAME = "agy-acp";
|
|
3
|
+
export const PRODUCT_AGENT_TITLE = "paseo-agy-acp (official Antigravity ACP kernel)";
|
|
4
|
+
export function overlayProductIdentity(result, version) {
|
|
5
|
+
if (!isRecord(result))
|
|
6
|
+
return result;
|
|
7
|
+
const next = { ...result };
|
|
8
|
+
const previousInfo = isRecord(next.agentInfo) ? next.agentInfo : {};
|
|
9
|
+
next.agentInfo = {
|
|
10
|
+
...previousInfo,
|
|
11
|
+
name: PRODUCT_AGENT_NAME,
|
|
12
|
+
title: PRODUCT_AGENT_TITLE,
|
|
13
|
+
version
|
|
14
|
+
};
|
|
15
|
+
return next;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=identity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"identity.js","sourceRoot":"","sources":["../../../ACP Connector/official-kernel/identity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzC,MAAM,CAAC,MAAM,kBAAkB,GAAG,SAAS,CAAC;AAC5C,MAAM,CAAC,MAAM,mBAAmB,GAAG,iDAAiD,CAAC;AAErF,MAAM,UAAU,sBAAsB,CAAC,MAAe,EAAE,OAAe;IACrE,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC;QAAE,OAAO,MAAM,CAAC;IACrC,MAAM,IAAI,GAA4B,EAAE,GAAG,MAAM,EAAE,CAAC;IACpD,MAAM,YAAY,GAAG,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC;IACpE,IAAI,CAAC,SAAS,GAAG;QACf,GAAG,YAAY;QACf,IAAI,EAAE,kBAAkB;QACxB,KAAK,EAAE,mBAAmB;QAC1B,OAAO;KACR,CAAC;IACF,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export type JsonRpcId = string | number;
|
|
2
|
+
export interface JsonRpcRequest {
|
|
3
|
+
jsonrpc?: string;
|
|
4
|
+
id: JsonRpcId;
|
|
5
|
+
method: string;
|
|
6
|
+
params?: unknown;
|
|
7
|
+
}
|
|
8
|
+
export interface JsonRpcNotification {
|
|
9
|
+
jsonrpc?: string;
|
|
10
|
+
method: string;
|
|
11
|
+
params?: unknown;
|
|
12
|
+
}
|
|
13
|
+
export interface JsonRpcSuccess {
|
|
14
|
+
jsonrpc?: string;
|
|
15
|
+
id: JsonRpcId;
|
|
16
|
+
result: unknown;
|
|
17
|
+
}
|
|
18
|
+
export interface JsonRpcFailure {
|
|
19
|
+
jsonrpc?: string;
|
|
20
|
+
id: JsonRpcId;
|
|
21
|
+
error: {
|
|
22
|
+
code: number;
|
|
23
|
+
message: string;
|
|
24
|
+
data?: unknown;
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
export type JsonRpcMessage = JsonRpcRequest | JsonRpcNotification | JsonRpcSuccess | JsonRpcFailure;
|
|
28
|
+
export declare function isRecord(value: unknown): value is Record<string, unknown>;
|
|
29
|
+
export declare function isJsonRpcMessage(value: unknown): value is JsonRpcMessage;
|
|
30
|
+
export declare function isJsonRpcRequest(value: JsonRpcMessage): value is JsonRpcRequest;
|
|
31
|
+
export declare function isJsonRpcNotification(value: JsonRpcMessage): value is JsonRpcNotification;
|
|
32
|
+
export declare function isJsonRpcSuccess(value: JsonRpcMessage): value is JsonRpcSuccess;
|
|
33
|
+
export declare function isJsonRpcFailure(value: JsonRpcMessage): value is JsonRpcFailure;
|
|
34
|
+
export declare function jsonRpcError(id: JsonRpcId, message: string, code?: number, data?: unknown): JsonRpcFailure;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export function isRecord(value) {
|
|
2
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
3
|
+
}
|
|
4
|
+
export function isJsonRpcMessage(value) {
|
|
5
|
+
return isRecord(value) && (typeof value.method === "string" || "result" in value || "error" in value);
|
|
6
|
+
}
|
|
7
|
+
export function isJsonRpcRequest(value) {
|
|
8
|
+
return "method" in value && typeof value.method === "string" && "id" in value && value.id !== undefined;
|
|
9
|
+
}
|
|
10
|
+
export function isJsonRpcNotification(value) {
|
|
11
|
+
return "method" in value && typeof value.method === "string" && !("id" in value);
|
|
12
|
+
}
|
|
13
|
+
export function isJsonRpcSuccess(value) {
|
|
14
|
+
return "id" in value && "result" in value && !("method" in value);
|
|
15
|
+
}
|
|
16
|
+
export function isJsonRpcFailure(value) {
|
|
17
|
+
return "id" in value && "error" in value && !("method" in value);
|
|
18
|
+
}
|
|
19
|
+
export function jsonRpcError(id, message, code = -32000, data) {
|
|
20
|
+
return {
|
|
21
|
+
jsonrpc: "2.0",
|
|
22
|
+
id,
|
|
23
|
+
error: data === undefined ? { code, message } : { code, message, data }
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=json-rpc.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"json-rpc.js","sourceRoot":"","sources":["../../../ACP Connector/official-kernel/json-rpc.ts"],"names":[],"mappings":"AAqCA,MAAM,UAAU,QAAQ,CAAC,KAAc;IACrC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC9E,CAA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"./kernel-compat-pins.js";
|
|
2
|
+
export interface KernelCompatLayout {
|
|
3
|
+
/** The binary and harness are release-root-relative, not runfiles-relative. */
|
|
4
|
+
readonly kernelExecutableRelativePath: string;
|
|
5
|
+
readonly externalHarnessRelativePath: string;
|
|
6
|
+
/** The compatibility module and importer values are runfiles-relative. */
|
|
7
|
+
readonly compatModuleRelativePath: string;
|
|
8
|
+
readonly importerEnvironment: Readonly<Record<string, string>>;
|
|
9
|
+
}
|
|
10
|
+
export declare const DEFAULT_KERNEL_COMPAT_LAYOUT: KernelCompatLayout;
|
|
11
|
+
export interface KernelCompatMarkerEdit {
|
|
12
|
+
readonly id: string;
|
|
13
|
+
readonly target: "modelSelection" | "proxyServer";
|
|
14
|
+
readonly find: string;
|
|
15
|
+
readonly replacement: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Marker strings are caller-supplied and only their digests are persisted.
|
|
19
|
+
* This keeps proprietary source context and conventional patches out of Git.
|
|
20
|
+
*/
|
|
21
|
+
export interface KernelCompatPatchPlan {
|
|
22
|
+
readonly edits: readonly KernelCompatMarkerEdit[];
|
|
23
|
+
}
|
|
24
|
+
export interface KernelCompatLifecycleHooks {
|
|
25
|
+
/** Test-only fault seam immediately before the one atomic active-pointer commit. */
|
|
26
|
+
readonly beforeActivationCommit?: (state: Readonly<ActivationStateView>) => void;
|
|
27
|
+
/** Test-only fault seam immediately after the one atomic active-pointer commit. */
|
|
28
|
+
readonly afterActivationCommit?: (state: Readonly<ActivationStateView>) => void;
|
|
29
|
+
}
|
|
30
|
+
export interface OfficialKernelCompatLifecycleOptions {
|
|
31
|
+
readonly stateRoot: string;
|
|
32
|
+
readonly pins?: KernelCompatPins;
|
|
33
|
+
readonly clock?: () => Date;
|
|
34
|
+
readonly hooks?: KernelCompatLifecycleHooks;
|
|
35
|
+
}
|
|
36
|
+
export interface PrepareKernelCompatOptions {
|
|
37
|
+
readonly parPath: string;
|
|
38
|
+
readonly externalHarnessPath: string;
|
|
39
|
+
readonly compatModulePath: string;
|
|
40
|
+
readonly patchPlan: KernelCompatPatchPlan;
|
|
41
|
+
readonly compatibilityVersion?: string;
|
|
42
|
+
readonly layout?: Partial<KernelCompatLayout>;
|
|
43
|
+
}
|
|
44
|
+
export interface PreparedKernel {
|
|
45
|
+
readonly artifactId: string;
|
|
46
|
+
readonly releasePath: string;
|
|
47
|
+
/** A release-local wrapper suitable for pre-activation smoke tests. */
|
|
48
|
+
readonly wrapperPath: string;
|
|
49
|
+
/** Stable path for PASEO_AGY_ACP_OFFICIAL_BIN after activate(). */
|
|
50
|
+
readonly stableWrapperPath: string;
|
|
51
|
+
readonly receiptPath: string;
|
|
52
|
+
readonly reused: boolean;
|
|
53
|
+
}
|
|
54
|
+
export interface VerificationResult {
|
|
55
|
+
readonly artifactId: string;
|
|
56
|
+
readonly releasePath: string;
|
|
57
|
+
readonly wrapperPath: string;
|
|
58
|
+
readonly verifiedAt: string;
|
|
59
|
+
}
|
|
60
|
+
export interface ActivationResult {
|
|
61
|
+
readonly changed: boolean;
|
|
62
|
+
readonly currentArtifactId: string;
|
|
63
|
+
readonly previousArtifactId?: string;
|
|
64
|
+
/** Stable activation wrapper, not a mutable per-release alias. */
|
|
65
|
+
readonly wrapperPath: string;
|
|
66
|
+
readonly releaseWrapperPath: string;
|
|
67
|
+
}
|
|
68
|
+
export interface KernelCompatReferenceStatus {
|
|
69
|
+
readonly artifactId: string;
|
|
70
|
+
readonly wrapperPath?: string;
|
|
71
|
+
readonly verified: boolean;
|
|
72
|
+
readonly error?: string;
|
|
73
|
+
}
|
|
74
|
+
export interface KernelCompatStatus {
|
|
75
|
+
readonly stateRoot: string;
|
|
76
|
+
readonly rootExists: boolean;
|
|
77
|
+
readonly rootSecure: boolean;
|
|
78
|
+
readonly stableWrapperPath?: string;
|
|
79
|
+
readonly current?: KernelCompatReferenceStatus;
|
|
80
|
+
readonly previous?: KernelCompatReferenceStatus;
|
|
81
|
+
readonly stagingEntries: readonly string[];
|
|
82
|
+
readonly issues: readonly string[];
|
|
83
|
+
}
|
|
84
|
+
export interface CleanupOptions {
|
|
85
|
+
/** Completed releases are retained unless this explicit local opt-in is set. */
|
|
86
|
+
readonly removeUnreferenced?: boolean;
|
|
87
|
+
}
|
|
88
|
+
export interface CleanupResult {
|
|
89
|
+
readonly removedArtifactIds: readonly string[];
|
|
90
|
+
readonly removedStagingEntries: readonly string[];
|
|
91
|
+
/** Finalized, unreferenced activation records only; the active record is retained. */
|
|
92
|
+
readonly removedActivationStateDirectories: readonly string[];
|
|
93
|
+
/** Safe, current-user-owned stale lock receipts recovered from prior writers. */
|
|
94
|
+
readonly removedStaleLockQuarantineFiles: readonly string[];
|
|
95
|
+
readonly skippedEntries: readonly string[];
|
|
96
|
+
}
|
|
97
|
+
export declare class KernelCompatLifecycleError extends Error {
|
|
98
|
+
constructor(message: string);
|
|
99
|
+
}
|
|
100
|
+
interface ActivationStateView {
|
|
101
|
+
readonly currentArtifactId: string;
|
|
102
|
+
readonly previousArtifactId?: string;
|
|
103
|
+
}
|
|
104
|
+
export declare class OfficialKernelCompatLifecycle {
|
|
105
|
+
#private;
|
|
106
|
+
constructor(options: OfficialKernelCompatLifecycleOptions);
|
|
107
|
+
prepare(options: PrepareKernelCompatOptions): Promise<PreparedKernel>;
|
|
108
|
+
verify(artifactId?: string): Promise<VerificationResult>;
|
|
109
|
+
activate(artifactId: string): Promise<ActivationResult>;
|
|
110
|
+
rollback(): Promise<ActivationResult>;
|
|
111
|
+
status(): Promise<KernelCompatStatus>;
|
|
112
|
+
cleanup(options?: CleanupOptions): Promise<CleanupResult>;
|
|
113
|
+
private prepareUnlocked;
|
|
114
|
+
}
|
|
115
|
+
export {};
|