@coro-ai/runner 0.1.30 → 0.1.32
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/src/jobs/campaign-context.d.ts +40 -0
- package/dist/src/jobs/campaign-context.js +234 -0
- package/dist/src/jobs/campaign-context.js.map +1 -0
- package/dist/src/jobs/dispatcher.js +53 -9
- package/dist/src/jobs/dispatcher.js.map +1 -1
- package/dist/src/jobs/workspace-layout.d.ts +2 -0
- package/dist/src/jobs/workspace-layout.js +7 -1
- package/dist/src/jobs/workspace-layout.js.map +1 -1
- package/node_modules/@coro-ai/cloud-protocol/package.json +1 -1
- package/node_modules/@coro-ai/intelligence-base/layer/agents/coder.md +2 -2
- package/node_modules/@coro-ai/intelligence-base/layer/agents/planner.md +4 -3
- package/node_modules/@coro-ai/intelligence-base/package.json +1 -1
- package/node_modules/@coro-ai/llm-anthropic/dist/chat-via-sdk.d.ts +9 -0
- package/node_modules/@coro-ai/llm-anthropic/dist/chat-via-sdk.d.ts.map +1 -0
- package/node_modules/@coro-ai/llm-anthropic/dist/chat-via-sdk.js +180 -0
- package/node_modules/@coro-ai/llm-anthropic/dist/chat-via-sdk.js.map +1 -0
- package/node_modules/@coro-ai/llm-anthropic/dist/executor.d.ts +8 -8
- package/node_modules/@coro-ai/llm-anthropic/dist/executor.d.ts.map +1 -1
- package/node_modules/@coro-ai/llm-anthropic/dist/executor.js +15 -9
- package/node_modules/@coro-ai/llm-anthropic/dist/executor.js.map +1 -1
- package/node_modules/@coro-ai/llm-anthropic/package.json +1 -1
- package/node_modules/@coro-ai/llm-openai/dist/executor.d.ts.map +1 -1
- package/node_modules/@coro-ai/llm-openai/dist/executor.js +43 -30
- package/node_modules/@coro-ai/llm-openai/dist/executor.js.map +1 -1
- package/node_modules/@coro-ai/llm-openai/dist/steering-input.d.ts +21 -0
- package/node_modules/@coro-ai/llm-openai/dist/steering-input.d.ts.map +1 -0
- package/node_modules/@coro-ai/llm-openai/dist/steering-input.js +64 -0
- package/node_modules/@coro-ai/llm-openai/dist/steering-input.js.map +1 -0
- package/node_modules/@coro-ai/llm-openai/package.json +1 -1
- package/node_modules/@coro-ai/plugin-sdk/package.json +1 -1
- package/node_modules/hono/dist/tsconfig.build.tsbuildinfo +1 -1
- package/node_modules/hono/package.json +2 -4
- package/node_modules/openai/CHANGELOG.md +30 -1
- package/node_modules/openai/README.md +1 -1
- package/node_modules/openai/lib/AbstractChatCompletionRunner.d.mts.map +1 -1
- package/node_modules/openai/lib/AbstractChatCompletionRunner.d.ts.map +1 -1
- package/node_modules/openai/lib/AbstractChatCompletionRunner.js +6 -1
- package/node_modules/openai/lib/AbstractChatCompletionRunner.js.map +1 -1
- package/node_modules/openai/lib/AbstractChatCompletionRunner.mjs +6 -1
- package/node_modules/openai/lib/AbstractChatCompletionRunner.mjs.map +1 -1
- package/node_modules/openai/package.json +2 -11
- package/node_modules/openai/resources/admin/organization/admin-api-keys.d.mts +9 -0
- package/node_modules/openai/resources/admin/organization/admin-api-keys.d.mts.map +1 -1
- package/node_modules/openai/resources/admin/organization/admin-api-keys.d.ts +9 -0
- package/node_modules/openai/resources/admin/organization/admin-api-keys.d.ts.map +1 -1
- package/node_modules/openai/resources/admin/organization/audit-logs.d.mts +113 -3
- package/node_modules/openai/resources/admin/organization/audit-logs.d.mts.map +1 -1
- package/node_modules/openai/resources/admin/organization/audit-logs.d.ts +113 -3
- package/node_modules/openai/resources/admin/organization/audit-logs.d.ts.map +1 -1
- package/node_modules/openai/resources/admin/organization/projects/index.d.mts +1 -1
- package/node_modules/openai/resources/admin/organization/projects/index.d.mts.map +1 -1
- package/node_modules/openai/resources/admin/organization/projects/index.d.ts +1 -1
- package/node_modules/openai/resources/admin/organization/projects/index.d.ts.map +1 -1
- package/node_modules/openai/resources/admin/organization/projects/index.js.map +1 -1
- package/node_modules/openai/resources/admin/organization/projects/index.mjs.map +1 -1
- package/node_modules/openai/resources/admin/organization/projects/projects.d.mts +2 -2
- package/node_modules/openai/resources/admin/organization/projects/projects.d.mts.map +1 -1
- package/node_modules/openai/resources/admin/organization/projects/projects.d.ts +2 -2
- package/node_modules/openai/resources/admin/organization/projects/projects.d.ts.map +1 -1
- package/node_modules/openai/resources/admin/organization/projects/projects.js.map +1 -1
- package/node_modules/openai/resources/admin/organization/projects/projects.mjs.map +1 -1
- package/node_modules/openai/resources/admin/organization/projects/spend-alerts.d.mts +20 -1
- package/node_modules/openai/resources/admin/organization/projects/spend-alerts.d.mts.map +1 -1
- package/node_modules/openai/resources/admin/organization/projects/spend-alerts.d.ts +20 -1
- package/node_modules/openai/resources/admin/organization/projects/spend-alerts.d.ts.map +1 -1
- package/node_modules/openai/resources/admin/organization/projects/spend-alerts.js +19 -0
- package/node_modules/openai/resources/admin/organization/projects/spend-alerts.js.map +1 -1
- package/node_modules/openai/resources/admin/organization/projects/spend-alerts.mjs +19 -0
- package/node_modules/openai/resources/admin/organization/projects/spend-alerts.mjs.map +1 -1
- package/node_modules/openai/resources/admin/organization/spend-alerts.d.mts +12 -0
- package/node_modules/openai/resources/admin/organization/spend-alerts.d.mts.map +1 -1
- package/node_modules/openai/resources/admin/organization/spend-alerts.d.ts +12 -0
- package/node_modules/openai/resources/admin/organization/spend-alerts.d.ts.map +1 -1
- package/node_modules/openai/resources/admin/organization/spend-alerts.js +17 -0
- package/node_modules/openai/resources/admin/organization/spend-alerts.js.map +1 -1
- package/node_modules/openai/resources/admin/organization/spend-alerts.mjs +17 -0
- package/node_modules/openai/resources/admin/organization/spend-alerts.mjs.map +1 -1
- package/node_modules/openai/resources/realtime/client-secrets.d.mts +9 -4
- package/node_modules/openai/resources/realtime/client-secrets.d.mts.map +1 -1
- package/node_modules/openai/resources/realtime/client-secrets.d.ts +9 -4
- package/node_modules/openai/resources/realtime/client-secrets.d.ts.map +1 -1
- package/node_modules/openai/resources/realtime/realtime.d.mts +18 -8
- package/node_modules/openai/resources/realtime/realtime.d.mts.map +1 -1
- package/node_modules/openai/resources/realtime/realtime.d.ts +18 -8
- package/node_modules/openai/resources/realtime/realtime.d.ts.map +1 -1
- package/node_modules/openai/resources/realtime/realtime.js.map +1 -1
- package/node_modules/openai/resources/realtime/realtime.mjs.map +1 -1
- package/node_modules/openai/resources/responses/input-tokens.d.mts +6 -5
- package/node_modules/openai/resources/responses/input-tokens.d.mts.map +1 -1
- package/node_modules/openai/resources/responses/input-tokens.d.ts +6 -5
- package/node_modules/openai/resources/responses/input-tokens.d.ts.map +1 -1
- package/node_modules/openai/resources/responses/responses.d.mts +11 -6
- package/node_modules/openai/resources/responses/responses.d.mts.map +1 -1
- package/node_modules/openai/resources/responses/responses.d.ts +11 -6
- package/node_modules/openai/resources/responses/responses.d.ts.map +1 -1
- package/node_modules/openai/resources/responses/responses.js.map +1 -1
- package/node_modules/openai/resources/responses/responses.mjs.map +1 -1
- package/node_modules/openai/resources/shared.d.mts +6 -0
- package/node_modules/openai/resources/shared.d.mts.map +1 -1
- package/node_modules/openai/resources/shared.d.ts +6 -0
- package/node_modules/openai/resources/shared.d.ts.map +1 -1
- package/node_modules/openai/resources/videos.d.mts +1 -1
- package/node_modules/openai/resources/videos.d.ts +1 -1
- package/node_modules/openai/src/lib/AbstractChatCompletionRunner.ts +6 -1
- package/node_modules/openai/src/resources/admin/organization/admin-api-keys.ts +11 -0
- package/node_modules/openai/src/resources/admin/organization/audit-logs.ts +148 -1
- package/node_modules/openai/src/resources/admin/organization/projects/index.ts +1 -0
- package/node_modules/openai/src/resources/admin/organization/projects/projects.ts +2 -0
- package/node_modules/openai/src/resources/admin/organization/projects/spend-alerts.ts +32 -0
- package/node_modules/openai/src/resources/admin/organization/spend-alerts.ts +18 -0
- package/node_modules/openai/src/resources/realtime/client-secrets.ts +10 -4
- package/node_modules/openai/src/resources/realtime/realtime.ts +20 -8
- package/node_modules/openai/src/resources/responses/input-tokens.ts +6 -5
- package/node_modules/openai/src/resources/responses/responses.ts +12 -6
- package/node_modules/openai/src/resources/shared.ts +7 -0
- package/node_modules/openai/src/resources/videos.ts +1 -1
- package/node_modules/openai/src/version.ts +1 -1
- package/node_modules/openai/version.d.mts +1 -1
- package/node_modules/openai/version.d.ts +1 -1
- package/node_modules/openai/version.js +1 -1
- package/node_modules/openai/version.mjs +1 -1
- package/node_modules/pg/README.md +1 -0
- package/node_modules/pg/lib/client.js +7 -1
- package/node_modules/pg/lib/connection-parameters.js +13 -0
- package/node_modules/pg/lib/connection.js +43 -22
- package/node_modules/pg/lib/defaults.js +3 -0
- package/node_modules/pg/lib/query.js +4 -0
- package/node_modules/pg/package.json +4 -4
- package/node_modules/pg-connection-string/README.md +1 -1
- package/node_modules/pg-connection-string/index.d.ts +1 -0
- package/node_modules/pg-connection-string/index.js +6 -0
- package/node_modules/pg-connection-string/package.json +3 -3
- package/node_modules/pg-protocol/dist/b.js.map +1 -1
- package/node_modules/pg-protocol/dist/buffer-reader.d.ts +0 -1
- package/node_modules/pg-protocol/dist/buffer-reader.js +1 -1
- package/node_modules/pg-protocol/dist/buffer-reader.js.map +1 -1
- package/node_modules/pg-protocol/dist/buffer-writer.d.ts +2 -1
- package/node_modules/pg-protocol/dist/buffer-writer.js +23 -0
- package/node_modules/pg-protocol/dist/buffer-writer.js.map +1 -1
- package/node_modules/pg-protocol/dist/inbound-parser.test.js +1 -1
- package/node_modules/pg-protocol/dist/inbound-parser.test.js.map +1 -1
- package/node_modules/pg-protocol/dist/index.d.ts +0 -1
- package/node_modules/pg-protocol/dist/index.js +2 -2
- package/node_modules/pg-protocol/dist/index.js.map +1 -1
- package/node_modules/pg-protocol/dist/messages.d.ts +2 -3
- package/node_modules/pg-protocol/dist/outbound-serializer.test.js +73 -0
- package/node_modules/pg-protocol/dist/outbound-serializer.test.js.map +1 -1
- package/node_modules/pg-protocol/dist/parser.d.ts +3 -5
- package/node_modules/pg-protocol/dist/parser.js +1 -1
- package/node_modules/pg-protocol/dist/parser.js.map +1 -1
- package/node_modules/pg-protocol/dist/serializer.d.ts +9 -10
- package/node_modules/pg-protocol/dist/serializer.js +11 -4
- package/node_modules/pg-protocol/dist/serializer.js.map +1 -1
- package/node_modules/pg-protocol/package.json +2 -2
- package/node_modules/pg-protocol/src/buffer-reader.ts +1 -1
- package/node_modules/pg-protocol/src/buffer-writer.ts +25 -0
- package/node_modules/pg-protocol/src/outbound-serializer.test.ts +80 -0
- package/node_modules/pg-protocol/src/parser.ts +1 -1
- package/node_modules/pg-protocol/src/serializer.ts +10 -4
- package/node_modules/semver/classes/range.js +6 -2
- package/node_modules/semver/package.json +1 -1
- package/package.json +6 -6
|
@@ -26,7 +26,7 @@ const password = (password) => {
|
|
|
26
26
|
};
|
|
27
27
|
const sendSASLInitialResponseMessage = function (mechanism, initialResponse) {
|
|
28
28
|
// 0x70 = 'p'
|
|
29
|
-
writer.addCString(mechanism).
|
|
29
|
+
writer.addCString(mechanism).addInt32PrefixedString(initialResponse);
|
|
30
30
|
return writer.flush(112 /* code.startup */);
|
|
31
31
|
};
|
|
32
32
|
const sendSCRAMClientFinalMessage = function (additionalData) {
|
|
@@ -79,8 +79,8 @@ const writeValues = function (values, valueMapper) {
|
|
|
79
79
|
else {
|
|
80
80
|
// add the param type (string) to the writer
|
|
81
81
|
writer.addInt16(0 /* ParamType.STRING */);
|
|
82
|
-
|
|
83
|
-
paramWriter.
|
|
82
|
+
// length prefix + UTF-8 bytes in one pass (Buffer.byteLength computed once)
|
|
83
|
+
paramWriter.addInt32PrefixedString(mappedVal);
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
86
|
};
|
|
@@ -93,7 +93,14 @@ const bind = (config = {}) => {
|
|
|
93
93
|
const len = values.length;
|
|
94
94
|
writer.addCString(portal).addCString(statement);
|
|
95
95
|
writer.addInt16(len);
|
|
96
|
-
|
|
96
|
+
try {
|
|
97
|
+
writeValues(values, config.valueMapper);
|
|
98
|
+
}
|
|
99
|
+
catch (err) {
|
|
100
|
+
writer.clear();
|
|
101
|
+
paramWriter.clear();
|
|
102
|
+
throw err;
|
|
103
|
+
}
|
|
97
104
|
writer.addInt16(len);
|
|
98
105
|
writer.add(paramWriter.flush());
|
|
99
106
|
// all results use the same format code
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serializer.js","sourceRoot":"","sources":["../src/serializer.ts"],"names":[],"mappings":";;;AAAA,mDAAwC;AAkBxC,MAAM,MAAM,GAAG,IAAI,sBAAM,EAAE,CAAA;AAE3B,MAAM,OAAO,GAAG,CAAC,IAA4B,EAAU,EAAE;IACvD,mBAAmB;IACnB,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAA;IAC9B,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;
|
|
1
|
+
{"version":3,"file":"serializer.js","sourceRoot":"","sources":["../src/serializer.ts"],"names":[],"mappings":";;;AAAA,mDAAwC;AAkBxC,MAAM,MAAM,GAAG,IAAI,sBAAM,EAAE,CAAA;AAE3B,MAAM,OAAO,GAAG,CAAC,IAA4B,EAAU,EAAE;IACvD,mBAAmB;IACnB,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAA;IAC9B,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;QACpC,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAA;IAC9C,CAAC;IAED,MAAM,CAAC,UAAU,CAAC,iBAAiB,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,CAAA;IAEvD,MAAM,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,CAAA;IAChD,sCAAsC;IAEtC,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,GAAG,CAAC,CAAA;IAEpC,OAAO,IAAI,sBAAM,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,GAAG,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S,GAAG;IAChB,OAAO;IACP,QAAQ;IACR,UAAU;IACV,8BAA8B;IAC9B,2BAA2B;IAC3B,KAAK;IACL,KAAK;IACL,IAAI;IACJ,OAAO;IACP,QAAQ;IACR,KAAK;IACL,KAAK,EAAE,GAAG,EAAE,CAAC,WAAW;IACxB,IAAI,EAAE,GAAG,EAAE,CAAC,UAAU;IACtB,GAAG,EAAE,GAAG,EAAE,CAAC,SAAS;IACpB,QAAQ;IACR,QAAQ,EAAE,GAAG,EAAE,CAAC,cAAc;IAC9B,QAAQ;IACR,MAAM;CACP,CAAA;AAEQ,8BAAS"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pg-protocol",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.15.0",
|
|
4
4
|
"description": "The postgres client/server binary protocol, implemented in TypeScript",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -41,5 +41,5 @@
|
|
|
41
41
|
"/src",
|
|
42
42
|
"/esm"
|
|
43
43
|
],
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "b617619f9fb6fbd231731823e2732a2927ded4be"
|
|
45
45
|
}
|
|
@@ -45,7 +45,7 @@ export class BufferReader {
|
|
|
45
45
|
const start = this.offset
|
|
46
46
|
let end = start
|
|
47
47
|
// eslint-disable-next-line no-empty
|
|
48
|
-
while (this.buffer[end++]
|
|
48
|
+
while (this.buffer[end++]) {}
|
|
49
49
|
this.offset = end
|
|
50
50
|
return this.buffer.toString(this.encoding, start, end - 1)
|
|
51
51
|
}
|
|
@@ -58,6 +58,26 @@ export class Writer {
|
|
|
58
58
|
return this
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
+
// Write an Int32 byte-length prefix immediately followed by the string's UTF-8
|
|
62
|
+
// bytes. Postgres' Bind wire format prefixes every parameter with its length,
|
|
63
|
+
// and doing it in one method computes Buffer.byteLength ONCE — the previous
|
|
64
|
+
// `addInt32(Buffer.byteLength(s)).addString(s)` pairing scanned the string
|
|
65
|
+
// three times (byteLength for the prefix, byteLength again inside addString,
|
|
66
|
+
// then the encode), which is costly for large text parameters.
|
|
67
|
+
public addInt32PrefixedString(string: string): Writer {
|
|
68
|
+
const len = Buffer.byteLength(string)
|
|
69
|
+
this.ensure(4 + len)
|
|
70
|
+
const buffer = this.buffer
|
|
71
|
+
let offset = this.offset
|
|
72
|
+
buffer[offset++] = (len >>> 24) & 0xff
|
|
73
|
+
buffer[offset++] = (len >>> 16) & 0xff
|
|
74
|
+
buffer[offset++] = (len >>> 8) & 0xff
|
|
75
|
+
buffer[offset++] = (len >>> 0) & 0xff
|
|
76
|
+
buffer.write(string, offset, 'utf-8')
|
|
77
|
+
this.offset = offset + len
|
|
78
|
+
return this
|
|
79
|
+
}
|
|
80
|
+
|
|
61
81
|
public add(otherBuffer: Buffer): Writer {
|
|
62
82
|
this.ensure(otherBuffer.length)
|
|
63
83
|
otherBuffer.copy(this.buffer, this.offset)
|
|
@@ -82,4 +102,9 @@ export class Writer {
|
|
|
82
102
|
this.buffer = Buffer.allocUnsafe(this.size)
|
|
83
103
|
return result
|
|
84
104
|
}
|
|
105
|
+
|
|
106
|
+
public clear(): void {
|
|
107
|
+
this.offset = 5
|
|
108
|
+
this.headerPosition = 0
|
|
109
|
+
}
|
|
85
110
|
}
|
|
@@ -129,6 +129,28 @@ describe('serializer', () => {
|
|
|
129
129
|
.join(true, 'B')
|
|
130
130
|
assert.deepEqual(actual, expectedBuffer)
|
|
131
131
|
})
|
|
132
|
+
|
|
133
|
+
it('encodes a multi-byte string param with its UTF-8 byte length, not char length', function () {
|
|
134
|
+
// Guards the single-pass addInt32PrefixedString write path: the Int32
|
|
135
|
+
// length prefix must be the UTF-8 byte count, not String.length. 'héllo中🎉'
|
|
136
|
+
// is 7 code points / 8 UTF-16 code units but 13 UTF-8 bytes.
|
|
137
|
+
const value = 'héllo中🎉'
|
|
138
|
+
const bytes = Buffer.from(value, 'utf8')
|
|
139
|
+
assert.notEqual(bytes.length, value.length) // sanity: the divergence we're testing
|
|
140
|
+
const actual = serialize.bind({ values: [value] })
|
|
141
|
+
const expectedBuffer = new BufferList()
|
|
142
|
+
.addCString('') // portal
|
|
143
|
+
.addCString('') // statement
|
|
144
|
+
.addInt16(1) // param format code count
|
|
145
|
+
.addInt16(0) // format code for the one value (text)
|
|
146
|
+
.addInt16(1) // value count
|
|
147
|
+
.addInt32(bytes.length) // 13 — the UTF-8 byte length, NOT value.length (8)
|
|
148
|
+
.add(bytes)
|
|
149
|
+
.addInt16(1) // result format code count
|
|
150
|
+
.addInt16(0) // result format (text)
|
|
151
|
+
.join(true, 'B')
|
|
152
|
+
assert.deepEqual(actual, expectedBuffer)
|
|
153
|
+
})
|
|
132
154
|
})
|
|
133
155
|
|
|
134
156
|
it('with custom valueMapper', function () {
|
|
@@ -273,4 +295,62 @@ describe('serializer', () => {
|
|
|
273
295
|
const expected = new BufferList().addInt16(1234).addInt16(5678).addInt32(3).addInt32(4).join(true)
|
|
274
296
|
assert.deepEqual(actual, expected)
|
|
275
297
|
})
|
|
298
|
+
|
|
299
|
+
describe('bind error recovery', () => {
|
|
300
|
+
const throwingMapper = () => {
|
|
301
|
+
throw new Error('valueMapper error')
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
it('produces correct bind output after a valueMapper exception', () => {
|
|
305
|
+
assert.throws(() => {
|
|
306
|
+
serialize.bind({
|
|
307
|
+
values: ['fail'],
|
|
308
|
+
valueMapper: throwingMapper,
|
|
309
|
+
})
|
|
310
|
+
}, /valueMapper error/)
|
|
311
|
+
|
|
312
|
+
const actual = serialize.bind({
|
|
313
|
+
portal: 'bang',
|
|
314
|
+
statement: 'woo',
|
|
315
|
+
values: ['1', 'hi', null, 'zing'],
|
|
316
|
+
})
|
|
317
|
+
const expectedBuffer = new BufferList()
|
|
318
|
+
.addCString('bang')
|
|
319
|
+
.addCString('woo')
|
|
320
|
+
.addInt16(4)
|
|
321
|
+
.addInt16(0)
|
|
322
|
+
.addInt16(0)
|
|
323
|
+
.addInt16(0)
|
|
324
|
+
.addInt16(0)
|
|
325
|
+
.addInt16(4)
|
|
326
|
+
.addInt32(1)
|
|
327
|
+
.add(Buffer.from('1'))
|
|
328
|
+
.addInt32(2)
|
|
329
|
+
.add(Buffer.from('hi'))
|
|
330
|
+
.addInt32(-1)
|
|
331
|
+
.addInt32(4)
|
|
332
|
+
.add(Buffer.from('zing'))
|
|
333
|
+
.addInt16(1)
|
|
334
|
+
.addInt16(0)
|
|
335
|
+
.join(true, 'B')
|
|
336
|
+
assert.deepEqual(actual, expectedBuffer)
|
|
337
|
+
})
|
|
338
|
+
|
|
339
|
+
it('produces correct output from other serializer methods after a failed bind', () => {
|
|
340
|
+
assert.throws(() => {
|
|
341
|
+
serialize.bind({
|
|
342
|
+
values: ['fail'],
|
|
343
|
+
valueMapper: throwingMapper,
|
|
344
|
+
})
|
|
345
|
+
}, /valueMapper error/)
|
|
346
|
+
|
|
347
|
+
const parseActual = serialize.parse({ text: '!' })
|
|
348
|
+
const parseExpected = new BufferList().addCString('').addCString('!').addInt16(0).join(true, 'P')
|
|
349
|
+
assert.deepEqual(parseActual, parseExpected)
|
|
350
|
+
|
|
351
|
+
const queryActual = serialize.query('select 1')
|
|
352
|
+
const queryExpected = new BufferList().addCString('select 1').join(true, 'Q')
|
|
353
|
+
assert.deepEqual(queryActual, queryExpected)
|
|
354
|
+
})
|
|
355
|
+
})
|
|
276
356
|
})
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
} from './messages'
|
|
29
29
|
import { BufferReader } from './buffer-reader'
|
|
30
30
|
|
|
31
|
-
// every message is prefixed with a single
|
|
31
|
+
// every message is prefixed with a single byte
|
|
32
32
|
const CODE_LENGTH = 1
|
|
33
33
|
// every message has an int32 length which includes itself but does
|
|
34
34
|
// NOT include the code in the length
|
|
@@ -48,7 +48,7 @@ const password = (password: string): Buffer => {
|
|
|
48
48
|
|
|
49
49
|
const sendSASLInitialResponseMessage = function (mechanism: string, initialResponse: string): Buffer {
|
|
50
50
|
// 0x70 = 'p'
|
|
51
|
-
writer.addCString(mechanism).
|
|
51
|
+
writer.addCString(mechanism).addInt32PrefixedString(initialResponse)
|
|
52
52
|
|
|
53
53
|
return writer.flush(code.startup)
|
|
54
54
|
}
|
|
@@ -135,8 +135,8 @@ const writeValues = function (values: any[], valueMapper?: ValueMapper): void {
|
|
|
135
135
|
} else {
|
|
136
136
|
// add the param type (string) to the writer
|
|
137
137
|
writer.addInt16(ParamType.STRING)
|
|
138
|
-
|
|
139
|
-
paramWriter.
|
|
138
|
+
// length prefix + UTF-8 bytes in one pass (Buffer.byteLength computed once)
|
|
139
|
+
paramWriter.addInt32PrefixedString(mappedVal)
|
|
140
140
|
}
|
|
141
141
|
}
|
|
142
142
|
}
|
|
@@ -152,7 +152,13 @@ const bind = (config: BindOpts = {}): Buffer => {
|
|
|
152
152
|
writer.addCString(portal).addCString(statement)
|
|
153
153
|
writer.addInt16(len)
|
|
154
154
|
|
|
155
|
-
|
|
155
|
+
try {
|
|
156
|
+
writeValues(values, config.valueMapper)
|
|
157
|
+
} catch (err) {
|
|
158
|
+
writer.clear()
|
|
159
|
+
paramWriter.clear()
|
|
160
|
+
throw err
|
|
161
|
+
}
|
|
156
162
|
|
|
157
163
|
writer.addInt16(len)
|
|
158
164
|
writer.add(paramWriter.flush())
|
|
@@ -299,6 +299,10 @@ const replaceTildes = (comp, options) => {
|
|
|
299
299
|
|
|
300
300
|
const replaceTilde = (comp, options) => {
|
|
301
301
|
const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE]
|
|
302
|
+
// if we're including prereleases in the match, then the lower bound is
|
|
303
|
+
// -0, the lowest possible prerelease value, just like x-ranges and carets.
|
|
304
|
+
// this keeps `~1.2` equivalent to the `1.2.x` x-range it's documented as.
|
|
305
|
+
const z = options.includePrerelease ? '-0' : ''
|
|
302
306
|
return comp.replace(r, (_, M, m, p, pr) => {
|
|
303
307
|
debug('tilde', comp, _, M, m, p, pr)
|
|
304
308
|
let ret
|
|
@@ -306,10 +310,10 @@ const replaceTilde = (comp, options) => {
|
|
|
306
310
|
if (isX(M)) {
|
|
307
311
|
ret = ''
|
|
308
312
|
} else if (isX(m)) {
|
|
309
|
-
ret = `>=${M}.0.0 <${+M + 1}.0.0-0`
|
|
313
|
+
ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`
|
|
310
314
|
} else if (isX(p)) {
|
|
311
315
|
// ~1.2 == >=1.2.0 <1.3.0-0
|
|
312
|
-
ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`
|
|
316
|
+
ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`
|
|
313
317
|
} else if (pr) {
|
|
314
318
|
debug('replaceTilde pr', pr)
|
|
315
319
|
ret = `>=${M}.${m}.${p}-${pr
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coro-ai/runner",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.32",
|
|
4
4
|
"description": "Coro Runner — local agent runtime, cloud control plane, and CLI (`coro` command).",
|
|
5
5
|
"license": "BUSL-1.1",
|
|
6
6
|
"engines": {
|
|
@@ -35,11 +35,11 @@
|
|
|
35
35
|
"cli"
|
|
36
36
|
],
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@coro-ai/cloud-protocol": "0.1.
|
|
39
|
-
"@coro-ai/intelligence-base": "0.1.
|
|
40
|
-
"@coro-ai/llm-anthropic": "0.1.
|
|
41
|
-
"@coro-ai/llm-openai": "0.1.
|
|
42
|
-
"@coro-ai/plugin-sdk": "0.1.
|
|
38
|
+
"@coro-ai/cloud-protocol": "0.1.32",
|
|
39
|
+
"@coro-ai/intelligence-base": "0.1.32",
|
|
40
|
+
"@coro-ai/llm-anthropic": "0.1.32",
|
|
41
|
+
"@coro-ai/llm-openai": "0.1.32",
|
|
42
|
+
"@coro-ai/plugin-sdk": "0.1.32",
|
|
43
43
|
"bcryptjs": "^3.0.3",
|
|
44
44
|
"better-sqlite3": "^12.9.0",
|
|
45
45
|
"commander": "^13.1.0",
|