@opengeni/agent-proto 0.5.1 → 0.6.0-canary.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/dist/gen/opengeni_agent.d.ts +35 -9
- package/dist/index.js +90 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/gen/opengeni_agent.ts +148 -11
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeni/agent-proto",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0-canary.1",
|
|
4
4
|
"description": "Generated TypeScript wire-protocol types for the OpenGeni self-hosted agent — the control-plane side of the single-source-of-truth codegen from agent/proto/opengeni_agent.proto.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -1031,6 +1031,11 @@ export interface Capabilities {
|
|
|
1031
1031
|
* CPU quota that an older memory-only runner would ignore as an unknown field.
|
|
1032
1032
|
*/
|
|
1033
1033
|
operationCpuQuota: boolean;
|
|
1034
|
+
/**
|
|
1035
|
+
* Transactional uploads via OpStart.fs_write / WriteChunk / OpQuery / OpCancel.
|
|
1036
|
+
* Independent of op_stream. Absent/false runners MUST NOT receive this path.
|
|
1037
|
+
*/
|
|
1038
|
+
transactionalFsWrite: boolean;
|
|
1034
1039
|
}
|
|
1035
1040
|
|
|
1036
1041
|
/**
|
|
@@ -1867,21 +1872,36 @@ export interface OpExit_FailureDetailEntry {
|
|
|
1867
1872
|
}
|
|
1868
1873
|
|
|
1869
1874
|
/**
|
|
1870
|
-
*
|
|
1871
|
-
*
|
|
1875
|
+
* Transactional upload begin. Requires transactional_fs_write, not op_stream.
|
|
1876
|
+
* The op_id must use the fsw- namespace; bytes arrive as sequential WriteChunk
|
|
1877
|
+
* requests. This path emits no OpFrames and supports no OpAttach/OpAck.
|
|
1872
1878
|
*/
|
|
1873
1879
|
export interface FsWriteBegin {
|
|
1874
1880
|
path: string;
|
|
1875
|
-
/**
|
|
1881
|
+
/**
|
|
1882
|
+
* Reserved compatibility field. Transactional writes require existing parent
|
|
1883
|
+
* directories; even true never creates visible directories during staging.
|
|
1884
|
+
*/
|
|
1876
1885
|
createParents: boolean;
|
|
1877
1886
|
/** POSIX mode for a newly created file (0 => platform default). */
|
|
1878
1887
|
mode: number;
|
|
1879
1888
|
/**
|
|
1880
|
-
*
|
|
1881
|
-
*
|
|
1882
|
-
*
|
|
1889
|
+
* Expected lowercase BLAKE3 hex digest of CURRENT content for replacement.
|
|
1890
|
+
* Required unless expected_absent. Checked with opened inode identity before
|
|
1891
|
+
* commit; optimistic against unrelated writers, NOT an atomic filesystem CAS.
|
|
1883
1892
|
*/
|
|
1884
1893
|
expectedBaseDigest: string;
|
|
1894
|
+
/** Required lowercase BLAKE3 hex digest of the complete intended content. */
|
|
1895
|
+
contentDigest: string;
|
|
1896
|
+
/** Required presence, including an explicitly present zero for empty content. */
|
|
1897
|
+
contentSize?:
|
|
1898
|
+
| string
|
|
1899
|
+
| undefined;
|
|
1900
|
+
/**
|
|
1901
|
+
* Exactly one of expected_absent / expected_base_digest is required.
|
|
1902
|
+
* Creation publishes atomically without replacing a concurrently created file.
|
|
1903
|
+
*/
|
|
1904
|
+
expectedAbsent: boolean;
|
|
1885
1905
|
}
|
|
1886
1906
|
|
|
1887
1907
|
/**
|
|
@@ -1967,21 +1987,29 @@ export interface OpStatus {
|
|
|
1967
1987
|
| undefined;
|
|
1968
1988
|
/** Present iff state == OP_STATE_LOST. */
|
|
1969
1989
|
lostReason: OpLostReason;
|
|
1990
|
+
/**
|
|
1991
|
+
* Transactional fs_write only: accepted byte offset. next_seq is the next
|
|
1992
|
+
* chunk sequence, not an output frame sequence. Complete echoes verified
|
|
1993
|
+
* content in exit.digests["content"] / exit.totals["content"]. No OpFrames.
|
|
1994
|
+
*/
|
|
1995
|
+
writeOffset: string;
|
|
1970
1996
|
}
|
|
1971
1997
|
|
|
1972
1998
|
/**
|
|
1973
1999
|
* One chunk of a streaming upload (server→runner): plain idempotent request/reply
|
|
1974
|
-
* per chunk (≤512 KiB).
|
|
2000
|
+
* per chunk (≤512 KiB). An exact duplicate of the most recently accepted chunk
|
|
2001
|
+
* is acked WITHOUT re-applying (including a lost final ack). Older sequences or
|
|
2002
|
+
* changed duplicate bodies are refused, never silently accepted or re-applied.
|
|
1975
2003
|
*/
|
|
1976
2004
|
export interface WriteChunk {
|
|
1977
2005
|
opId: string;
|
|
1978
2006
|
/** The op-scoped monotonic chunk sequence. */
|
|
1979
2007
|
seq: string;
|
|
1980
2008
|
bytes: Uint8Array;
|
|
1981
|
-
/**
|
|
2009
|
+
/** Final chunk: verify intended size/digest and base, then atomic publication. */
|
|
1982
2010
|
last: boolean;
|
|
1983
2011
|
/**
|
|
1984
|
-
* Byte offset this chunk writes at (
|
|
2012
|
+
* Byte offset this chunk writes at (writes land in an op-scoped temp file,
|
|
1985
2013
|
* committed on the last chunk — an aborted transfer leaves no visible file).
|
|
1986
2014
|
*/
|
|
1987
2015
|
offset: string;
|
|
@@ -2826,6 +2854,7 @@ function createBaseCapabilities(): Capabilities {
|
|
|
2826
2854
|
browserBridge: false,
|
|
2827
2855
|
operationResourcePolicy: false,
|
|
2828
2856
|
operationCpuQuota: false,
|
|
2857
|
+
transactionalFsWrite: false,
|
|
2829
2858
|
};
|
|
2830
2859
|
}
|
|
2831
2860
|
|
|
@@ -2870,6 +2899,9 @@ export const Capabilities: MessageFns<Capabilities> = {
|
|
|
2870
2899
|
if (message.operationCpuQuota !== false) {
|
|
2871
2900
|
writer.uint32(104).bool(message.operationCpuQuota);
|
|
2872
2901
|
}
|
|
2902
|
+
if (message.transactionalFsWrite !== false) {
|
|
2903
|
+
writer.uint32(112).bool(message.transactionalFsWrite);
|
|
2904
|
+
}
|
|
2873
2905
|
return writer;
|
|
2874
2906
|
},
|
|
2875
2907
|
|
|
@@ -2984,6 +3016,14 @@ export const Capabilities: MessageFns<Capabilities> = {
|
|
|
2984
3016
|
message.operationCpuQuota = reader.bool();
|
|
2985
3017
|
continue;
|
|
2986
3018
|
}
|
|
3019
|
+
case 14: {
|
|
3020
|
+
if (tag !== 112) {
|
|
3021
|
+
break;
|
|
3022
|
+
}
|
|
3023
|
+
|
|
3024
|
+
message.transactionalFsWrite = reader.bool();
|
|
3025
|
+
continue;
|
|
3026
|
+
}
|
|
2987
3027
|
}
|
|
2988
3028
|
if ((tag & 7) === 4 || tag === 0) {
|
|
2989
3029
|
break;
|
|
@@ -3036,6 +3076,11 @@ export const Capabilities: MessageFns<Capabilities> = {
|
|
|
3036
3076
|
: isSet(object.operation_cpu_quota)
|
|
3037
3077
|
? globalThis.Boolean(object.operation_cpu_quota)
|
|
3038
3078
|
: false,
|
|
3079
|
+
transactionalFsWrite: isSet(object.transactionalFsWrite)
|
|
3080
|
+
? globalThis.Boolean(object.transactionalFsWrite)
|
|
3081
|
+
: isSet(object.transactional_fs_write)
|
|
3082
|
+
? globalThis.Boolean(object.transactional_fs_write)
|
|
3083
|
+
: false,
|
|
3039
3084
|
};
|
|
3040
3085
|
},
|
|
3041
3086
|
|
|
@@ -3080,6 +3125,9 @@ export const Capabilities: MessageFns<Capabilities> = {
|
|
|
3080
3125
|
if (message.operationCpuQuota !== false) {
|
|
3081
3126
|
obj.operationCpuQuota = message.operationCpuQuota;
|
|
3082
3127
|
}
|
|
3128
|
+
if (message.transactionalFsWrite !== false) {
|
|
3129
|
+
obj.transactionalFsWrite = message.transactionalFsWrite;
|
|
3130
|
+
}
|
|
3083
3131
|
return obj;
|
|
3084
3132
|
},
|
|
3085
3133
|
|
|
@@ -3103,6 +3151,7 @@ export const Capabilities: MessageFns<Capabilities> = {
|
|
|
3103
3151
|
message.browserBridge = object.browserBridge ?? false;
|
|
3104
3152
|
message.operationResourcePolicy = object.operationResourcePolicy ?? false;
|
|
3105
3153
|
message.operationCpuQuota = object.operationCpuQuota ?? false;
|
|
3154
|
+
message.transactionalFsWrite = object.transactionalFsWrite ?? false;
|
|
3106
3155
|
return message;
|
|
3107
3156
|
},
|
|
3108
3157
|
};
|
|
@@ -11917,7 +11966,15 @@ export const OpExit_FailureDetailEntry: MessageFns<OpExit_FailureDetailEntry> =
|
|
|
11917
11966
|
};
|
|
11918
11967
|
|
|
11919
11968
|
function createBaseFsWriteBegin(): FsWriteBegin {
|
|
11920
|
-
return {
|
|
11969
|
+
return {
|
|
11970
|
+
path: "",
|
|
11971
|
+
createParents: false,
|
|
11972
|
+
mode: 0,
|
|
11973
|
+
expectedBaseDigest: "",
|
|
11974
|
+
contentDigest: "",
|
|
11975
|
+
contentSize: undefined,
|
|
11976
|
+
expectedAbsent: false,
|
|
11977
|
+
};
|
|
11921
11978
|
}
|
|
11922
11979
|
|
|
11923
11980
|
export const FsWriteBegin: MessageFns<FsWriteBegin> = {
|
|
@@ -11934,6 +11991,15 @@ export const FsWriteBegin: MessageFns<FsWriteBegin> = {
|
|
|
11934
11991
|
if (message.expectedBaseDigest !== "") {
|
|
11935
11992
|
writer.uint32(34).string(message.expectedBaseDigest);
|
|
11936
11993
|
}
|
|
11994
|
+
if (message.contentDigest !== "") {
|
|
11995
|
+
writer.uint32(42).string(message.contentDigest);
|
|
11996
|
+
}
|
|
11997
|
+
if (message.contentSize !== undefined) {
|
|
11998
|
+
writer.uint32(48).uint64(message.contentSize);
|
|
11999
|
+
}
|
|
12000
|
+
if (message.expectedAbsent !== false) {
|
|
12001
|
+
writer.uint32(56).bool(message.expectedAbsent);
|
|
12002
|
+
}
|
|
11937
12003
|
return writer;
|
|
11938
12004
|
},
|
|
11939
12005
|
|
|
@@ -11976,6 +12042,30 @@ export const FsWriteBegin: MessageFns<FsWriteBegin> = {
|
|
|
11976
12042
|
message.expectedBaseDigest = reader.string();
|
|
11977
12043
|
continue;
|
|
11978
12044
|
}
|
|
12045
|
+
case 5: {
|
|
12046
|
+
if (tag !== 42) {
|
|
12047
|
+
break;
|
|
12048
|
+
}
|
|
12049
|
+
|
|
12050
|
+
message.contentDigest = reader.string();
|
|
12051
|
+
continue;
|
|
12052
|
+
}
|
|
12053
|
+
case 6: {
|
|
12054
|
+
if (tag !== 48) {
|
|
12055
|
+
break;
|
|
12056
|
+
}
|
|
12057
|
+
|
|
12058
|
+
message.contentSize = reader.uint64().toString();
|
|
12059
|
+
continue;
|
|
12060
|
+
}
|
|
12061
|
+
case 7: {
|
|
12062
|
+
if (tag !== 56) {
|
|
12063
|
+
break;
|
|
12064
|
+
}
|
|
12065
|
+
|
|
12066
|
+
message.expectedAbsent = reader.bool();
|
|
12067
|
+
continue;
|
|
12068
|
+
}
|
|
11979
12069
|
}
|
|
11980
12070
|
if ((tag & 7) === 4 || tag === 0) {
|
|
11981
12071
|
break;
|
|
@@ -11999,6 +12089,21 @@ export const FsWriteBegin: MessageFns<FsWriteBegin> = {
|
|
|
11999
12089
|
: isSet(object.expected_base_digest)
|
|
12000
12090
|
? globalThis.String(object.expected_base_digest)
|
|
12001
12091
|
: "",
|
|
12092
|
+
contentDigest: isSet(object.contentDigest)
|
|
12093
|
+
? globalThis.String(object.contentDigest)
|
|
12094
|
+
: isSet(object.content_digest)
|
|
12095
|
+
? globalThis.String(object.content_digest)
|
|
12096
|
+
: "",
|
|
12097
|
+
contentSize: isSet(object.contentSize)
|
|
12098
|
+
? globalThis.String(object.contentSize)
|
|
12099
|
+
: isSet(object.content_size)
|
|
12100
|
+
? globalThis.String(object.content_size)
|
|
12101
|
+
: undefined,
|
|
12102
|
+
expectedAbsent: isSet(object.expectedAbsent)
|
|
12103
|
+
? globalThis.Boolean(object.expectedAbsent)
|
|
12104
|
+
: isSet(object.expected_absent)
|
|
12105
|
+
? globalThis.Boolean(object.expected_absent)
|
|
12106
|
+
: false,
|
|
12002
12107
|
};
|
|
12003
12108
|
},
|
|
12004
12109
|
|
|
@@ -12016,6 +12121,15 @@ export const FsWriteBegin: MessageFns<FsWriteBegin> = {
|
|
|
12016
12121
|
if (message.expectedBaseDigest !== "") {
|
|
12017
12122
|
obj.expectedBaseDigest = message.expectedBaseDigest;
|
|
12018
12123
|
}
|
|
12124
|
+
if (message.contentDigest !== "") {
|
|
12125
|
+
obj.contentDigest = message.contentDigest;
|
|
12126
|
+
}
|
|
12127
|
+
if (message.contentSize !== undefined) {
|
|
12128
|
+
obj.contentSize = message.contentSize;
|
|
12129
|
+
}
|
|
12130
|
+
if (message.expectedAbsent !== false) {
|
|
12131
|
+
obj.expectedAbsent = message.expectedAbsent;
|
|
12132
|
+
}
|
|
12019
12133
|
return obj;
|
|
12020
12134
|
},
|
|
12021
12135
|
|
|
@@ -12028,6 +12142,9 @@ export const FsWriteBegin: MessageFns<FsWriteBegin> = {
|
|
|
12028
12142
|
message.createParents = object.createParents ?? false;
|
|
12029
12143
|
message.mode = object.mode ?? 0;
|
|
12030
12144
|
message.expectedBaseDigest = object.expectedBaseDigest ?? "";
|
|
12145
|
+
message.contentDigest = object.contentDigest ?? "";
|
|
12146
|
+
message.contentSize = object.contentSize ?? undefined;
|
|
12147
|
+
message.expectedAbsent = object.expectedAbsent ?? false;
|
|
12031
12148
|
return message;
|
|
12032
12149
|
},
|
|
12033
12150
|
};
|
|
@@ -12540,7 +12657,7 @@ export const OpAttach: MessageFns<OpAttach> = {
|
|
|
12540
12657
|
};
|
|
12541
12658
|
|
|
12542
12659
|
function createBaseOpStatus(): OpStatus {
|
|
12543
|
-
return { opId: "", state: 0, nextSeq: "0", exit: undefined, lostReason: 0 };
|
|
12660
|
+
return { opId: "", state: 0, nextSeq: "0", exit: undefined, lostReason: 0, writeOffset: "0" };
|
|
12544
12661
|
}
|
|
12545
12662
|
|
|
12546
12663
|
export const OpStatus: MessageFns<OpStatus> = {
|
|
@@ -12560,6 +12677,9 @@ export const OpStatus: MessageFns<OpStatus> = {
|
|
|
12560
12677
|
if (message.lostReason !== 0) {
|
|
12561
12678
|
writer.uint32(40).int32(message.lostReason);
|
|
12562
12679
|
}
|
|
12680
|
+
if (message.writeOffset !== "0") {
|
|
12681
|
+
writer.uint32(48).uint64(message.writeOffset);
|
|
12682
|
+
}
|
|
12563
12683
|
return writer;
|
|
12564
12684
|
},
|
|
12565
12685
|
|
|
@@ -12610,6 +12730,14 @@ export const OpStatus: MessageFns<OpStatus> = {
|
|
|
12610
12730
|
message.lostReason = reader.int32() as any;
|
|
12611
12731
|
continue;
|
|
12612
12732
|
}
|
|
12733
|
+
case 6: {
|
|
12734
|
+
if (tag !== 48) {
|
|
12735
|
+
break;
|
|
12736
|
+
}
|
|
12737
|
+
|
|
12738
|
+
message.writeOffset = reader.uint64().toString();
|
|
12739
|
+
continue;
|
|
12740
|
+
}
|
|
12613
12741
|
}
|
|
12614
12742
|
if ((tag & 7) === 4 || tag === 0) {
|
|
12615
12743
|
break;
|
|
@@ -12638,6 +12766,11 @@ export const OpStatus: MessageFns<OpStatus> = {
|
|
|
12638
12766
|
: isSet(object.lost_reason)
|
|
12639
12767
|
? opLostReasonFromJSON(object.lost_reason)
|
|
12640
12768
|
: 0,
|
|
12769
|
+
writeOffset: isSet(object.writeOffset)
|
|
12770
|
+
? globalThis.String(object.writeOffset)
|
|
12771
|
+
: isSet(object.write_offset)
|
|
12772
|
+
? globalThis.String(object.write_offset)
|
|
12773
|
+
: "0",
|
|
12641
12774
|
};
|
|
12642
12775
|
},
|
|
12643
12776
|
|
|
@@ -12658,6 +12791,9 @@ export const OpStatus: MessageFns<OpStatus> = {
|
|
|
12658
12791
|
if (message.lostReason !== 0) {
|
|
12659
12792
|
obj.lostReason = opLostReasonToJSON(message.lostReason);
|
|
12660
12793
|
}
|
|
12794
|
+
if (message.writeOffset !== "0") {
|
|
12795
|
+
obj.writeOffset = message.writeOffset;
|
|
12796
|
+
}
|
|
12661
12797
|
return obj;
|
|
12662
12798
|
},
|
|
12663
12799
|
|
|
@@ -12671,6 +12807,7 @@ export const OpStatus: MessageFns<OpStatus> = {
|
|
|
12671
12807
|
message.nextSeq = object.nextSeq ?? "0";
|
|
12672
12808
|
message.exit = (object.exit !== undefined && object.exit !== null) ? OpExit.fromPartial(object.exit) : undefined;
|
|
12673
12809
|
message.lostReason = object.lostReason ?? 0;
|
|
12810
|
+
message.writeOffset = object.writeOffset ?? "0";
|
|
12674
12811
|
return message;
|
|
12675
12812
|
},
|
|
12676
12813
|
};
|