@themoltnet/node-red-contrib-core 0.12.6 → 0.12.8
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/nodes/src.js +1253 -66
- package/package.json +2 -2
package/dist/nodes/src.js
CHANGED
|
@@ -1675,6 +1675,21 @@ var verifyDiaryEntryById = (options) => (options.client ?? client).get({
|
|
|
1675
1675
|
...options
|
|
1676
1676
|
});
|
|
1677
1677
|
/**
|
|
1678
|
+
* Register an agent-signed executor manifest for fingerprint-only task claims.
|
|
1679
|
+
*/
|
|
1680
|
+
var registerExecutorManifest = (options) => (options.client ?? client).post({
|
|
1681
|
+
security: [{
|
|
1682
|
+
scheme: "bearer",
|
|
1683
|
+
type: "http"
|
|
1684
|
+
}],
|
|
1685
|
+
url: "/executor-manifests/register",
|
|
1686
|
+
...options,
|
|
1687
|
+
headers: {
|
|
1688
|
+
"Content-Type": "application/json",
|
|
1689
|
+
...options.headers
|
|
1690
|
+
}
|
|
1691
|
+
});
|
|
1692
|
+
/**
|
|
1678
1693
|
* Shallow liveness probe.
|
|
1679
1694
|
*/
|
|
1680
1695
|
var getHealth = (options) => (options?.client ?? client).get({
|
|
@@ -2000,6 +2015,124 @@ var updateRenderedPack = (options) => (options.client ?? client).patch({
|
|
|
2000
2015
|
}
|
|
2001
2016
|
});
|
|
2002
2017
|
/**
|
|
2018
|
+
* List tool policies for the active team.
|
|
2019
|
+
*/
|
|
2020
|
+
var listRuntimePolicies = (options) => (options.client ?? client).get({
|
|
2021
|
+
security: [
|
|
2022
|
+
{
|
|
2023
|
+
scheme: "bearer",
|
|
2024
|
+
type: "http"
|
|
2025
|
+
},
|
|
2026
|
+
{
|
|
2027
|
+
name: "X-Moltnet-Session-Token",
|
|
2028
|
+
type: "apiKey"
|
|
2029
|
+
},
|
|
2030
|
+
{
|
|
2031
|
+
in: "cookie",
|
|
2032
|
+
name: "ory_kratos_session",
|
|
2033
|
+
type: "apiKey"
|
|
2034
|
+
}
|
|
2035
|
+
],
|
|
2036
|
+
url: "/runtime-policies",
|
|
2037
|
+
...options
|
|
2038
|
+
});
|
|
2039
|
+
/**
|
|
2040
|
+
* Create a team-scoped tool policy granting a set of tools.
|
|
2041
|
+
*/
|
|
2042
|
+
var createRuntimePolicy = (options) => (options.client ?? client).post({
|
|
2043
|
+
security: [
|
|
2044
|
+
{
|
|
2045
|
+
scheme: "bearer",
|
|
2046
|
+
type: "http"
|
|
2047
|
+
},
|
|
2048
|
+
{
|
|
2049
|
+
name: "X-Moltnet-Session-Token",
|
|
2050
|
+
type: "apiKey"
|
|
2051
|
+
},
|
|
2052
|
+
{
|
|
2053
|
+
in: "cookie",
|
|
2054
|
+
name: "ory_kratos_session",
|
|
2055
|
+
type: "apiKey"
|
|
2056
|
+
}
|
|
2057
|
+
],
|
|
2058
|
+
url: "/runtime-policies",
|
|
2059
|
+
...options,
|
|
2060
|
+
headers: {
|
|
2061
|
+
"Content-Type": "application/json",
|
|
2062
|
+
...options.headers
|
|
2063
|
+
}
|
|
2064
|
+
});
|
|
2065
|
+
/**
|
|
2066
|
+
* Delete a tool policy and its tool grants.
|
|
2067
|
+
*/
|
|
2068
|
+
var deleteRuntimePolicy = (options) => (options.client ?? client).delete({
|
|
2069
|
+
security: [
|
|
2070
|
+
{
|
|
2071
|
+
scheme: "bearer",
|
|
2072
|
+
type: "http"
|
|
2073
|
+
},
|
|
2074
|
+
{
|
|
2075
|
+
name: "X-Moltnet-Session-Token",
|
|
2076
|
+
type: "apiKey"
|
|
2077
|
+
},
|
|
2078
|
+
{
|
|
2079
|
+
in: "cookie",
|
|
2080
|
+
name: "ory_kratos_session",
|
|
2081
|
+
type: "apiKey"
|
|
2082
|
+
}
|
|
2083
|
+
],
|
|
2084
|
+
url: "/runtime-policies/{policyId}",
|
|
2085
|
+
...options
|
|
2086
|
+
});
|
|
2087
|
+
/**
|
|
2088
|
+
* Get one tool policy with its granted tools.
|
|
2089
|
+
*/
|
|
2090
|
+
var getRuntimePolicy = (options) => (options.client ?? client).get({
|
|
2091
|
+
security: [
|
|
2092
|
+
{
|
|
2093
|
+
scheme: "bearer",
|
|
2094
|
+
type: "http"
|
|
2095
|
+
},
|
|
2096
|
+
{
|
|
2097
|
+
name: "X-Moltnet-Session-Token",
|
|
2098
|
+
type: "apiKey"
|
|
2099
|
+
},
|
|
2100
|
+
{
|
|
2101
|
+
in: "cookie",
|
|
2102
|
+
name: "ory_kratos_session",
|
|
2103
|
+
type: "apiKey"
|
|
2104
|
+
}
|
|
2105
|
+
],
|
|
2106
|
+
url: "/runtime-policies/{policyId}",
|
|
2107
|
+
...options
|
|
2108
|
+
});
|
|
2109
|
+
/**
|
|
2110
|
+
* Rename a policy and/or add/remove granted tools.
|
|
2111
|
+
*/
|
|
2112
|
+
var updateRuntimePolicy = (options) => (options.client ?? client).patch({
|
|
2113
|
+
security: [
|
|
2114
|
+
{
|
|
2115
|
+
scheme: "bearer",
|
|
2116
|
+
type: "http"
|
|
2117
|
+
},
|
|
2118
|
+
{
|
|
2119
|
+
name: "X-Moltnet-Session-Token",
|
|
2120
|
+
type: "apiKey"
|
|
2121
|
+
},
|
|
2122
|
+
{
|
|
2123
|
+
in: "cookie",
|
|
2124
|
+
name: "ory_kratos_session",
|
|
2125
|
+
type: "apiKey"
|
|
2126
|
+
}
|
|
2127
|
+
],
|
|
2128
|
+
url: "/runtime-policies/{policyId}",
|
|
2129
|
+
...options,
|
|
2130
|
+
headers: {
|
|
2131
|
+
"Content-Type": "application/json",
|
|
2132
|
+
...options.headers
|
|
2133
|
+
}
|
|
2134
|
+
});
|
|
2135
|
+
/**
|
|
2003
2136
|
* List runtime profiles for the active team context.
|
|
2004
2137
|
*/
|
|
2005
2138
|
var listRuntimeProfiles = (options) => (options?.client ?? client).get({
|
|
@@ -2118,6 +2251,76 @@ var updateRuntimeProfile = (options) => (options.client ?? client).patch({
|
|
|
2118
2251
|
}
|
|
2119
2252
|
});
|
|
2120
2253
|
/**
|
|
2254
|
+
* Resolve a runtime profile enforcement mode and its allowed-tool set (union of bound policies).
|
|
2255
|
+
*/
|
|
2256
|
+
var getRuntimeProfileAllowedTools = (options) => (options.client ?? client).get({
|
|
2257
|
+
security: [
|
|
2258
|
+
{
|
|
2259
|
+
scheme: "bearer",
|
|
2260
|
+
type: "http"
|
|
2261
|
+
},
|
|
2262
|
+
{
|
|
2263
|
+
name: "X-Moltnet-Session-Token",
|
|
2264
|
+
type: "apiKey"
|
|
2265
|
+
},
|
|
2266
|
+
{
|
|
2267
|
+
in: "cookie",
|
|
2268
|
+
name: "ory_kratos_session",
|
|
2269
|
+
type: "apiKey"
|
|
2270
|
+
}
|
|
2271
|
+
],
|
|
2272
|
+
url: "/runtime-profiles/{profileId}/allowed-tools",
|
|
2273
|
+
...options
|
|
2274
|
+
});
|
|
2275
|
+
/**
|
|
2276
|
+
* List the tool-policy IDs bound to a runtime profile.
|
|
2277
|
+
*/
|
|
2278
|
+
var getRuntimeProfilePolicies = (options) => (options.client ?? client).get({
|
|
2279
|
+
security: [
|
|
2280
|
+
{
|
|
2281
|
+
scheme: "bearer",
|
|
2282
|
+
type: "http"
|
|
2283
|
+
},
|
|
2284
|
+
{
|
|
2285
|
+
name: "X-Moltnet-Session-Token",
|
|
2286
|
+
type: "apiKey"
|
|
2287
|
+
},
|
|
2288
|
+
{
|
|
2289
|
+
in: "cookie",
|
|
2290
|
+
name: "ory_kratos_session",
|
|
2291
|
+
type: "apiKey"
|
|
2292
|
+
}
|
|
2293
|
+
],
|
|
2294
|
+
url: "/runtime-profiles/{profileId}/policies",
|
|
2295
|
+
...options
|
|
2296
|
+
});
|
|
2297
|
+
/**
|
|
2298
|
+
* Replace the set of tool policies bound to a runtime profile.
|
|
2299
|
+
*/
|
|
2300
|
+
var setRuntimeProfilePolicies = (options) => (options.client ?? client).put({
|
|
2301
|
+
security: [
|
|
2302
|
+
{
|
|
2303
|
+
scheme: "bearer",
|
|
2304
|
+
type: "http"
|
|
2305
|
+
},
|
|
2306
|
+
{
|
|
2307
|
+
name: "X-Moltnet-Session-Token",
|
|
2308
|
+
type: "apiKey"
|
|
2309
|
+
},
|
|
2310
|
+
{
|
|
2311
|
+
in: "cookie",
|
|
2312
|
+
name: "ory_kratos_session",
|
|
2313
|
+
type: "apiKey"
|
|
2314
|
+
}
|
|
2315
|
+
],
|
|
2316
|
+
url: "/runtime-profiles/{profileId}/policies",
|
|
2317
|
+
...options,
|
|
2318
|
+
headers: {
|
|
2319
|
+
"Content-Type": "application/json",
|
|
2320
|
+
...options.headers
|
|
2321
|
+
}
|
|
2322
|
+
});
|
|
2323
|
+
/**
|
|
2121
2324
|
* Get metadata for the durable team-scoped runtime session for a task attempt.
|
|
2122
2325
|
*/
|
|
2123
2326
|
var getRuntimeSession = (options) => (options.client ?? client).get({
|
|
@@ -5478,6 +5681,54 @@ function createRecoveryNamespace(context) {
|
|
|
5478
5681
|
};
|
|
5479
5682
|
}
|
|
5480
5683
|
//#endregion
|
|
5684
|
+
//#region ../sdk/src/namespaces/runtime-policies.ts
|
|
5685
|
+
function createRuntimePoliciesNamespace(context) {
|
|
5686
|
+
const { client, auth } = context;
|
|
5687
|
+
return {
|
|
5688
|
+
async create(body, options) {
|
|
5689
|
+
return unwrapResult(await createRuntimePolicy({
|
|
5690
|
+
client,
|
|
5691
|
+
auth,
|
|
5692
|
+
headers: requiredTeamHeaders(options),
|
|
5693
|
+
body
|
|
5694
|
+
}));
|
|
5695
|
+
},
|
|
5696
|
+
async list(options) {
|
|
5697
|
+
return unwrapResult(await listRuntimePolicies({
|
|
5698
|
+
client,
|
|
5699
|
+
auth,
|
|
5700
|
+
headers: requiredTeamHeaders(options)
|
|
5701
|
+
}));
|
|
5702
|
+
},
|
|
5703
|
+
async get(policyId, options) {
|
|
5704
|
+
return unwrapResult(await getRuntimePolicy({
|
|
5705
|
+
client,
|
|
5706
|
+
auth,
|
|
5707
|
+
path: { policyId },
|
|
5708
|
+
headers: requiredTeamHeaders(options)
|
|
5709
|
+
}));
|
|
5710
|
+
},
|
|
5711
|
+
async update(policyId, body, options) {
|
|
5712
|
+
return unwrapResult(await updateRuntimePolicy({
|
|
5713
|
+
client,
|
|
5714
|
+
auth,
|
|
5715
|
+
path: { policyId },
|
|
5716
|
+
headers: requiredTeamHeaders(options),
|
|
5717
|
+
body
|
|
5718
|
+
}));
|
|
5719
|
+
},
|
|
5720
|
+
async delete(policyId, options) {
|
|
5721
|
+
const result = await deleteRuntimePolicy({
|
|
5722
|
+
client,
|
|
5723
|
+
auth,
|
|
5724
|
+
path: { policyId },
|
|
5725
|
+
headers: requiredTeamHeaders(options)
|
|
5726
|
+
});
|
|
5727
|
+
if (result.error) unwrapResult(result);
|
|
5728
|
+
}
|
|
5729
|
+
};
|
|
5730
|
+
}
|
|
5731
|
+
//#endregion
|
|
5481
5732
|
//#region ../sdk/src/namespaces/runtime-profiles.ts
|
|
5482
5733
|
function createRuntimeProfilesNamespace(context) {
|
|
5483
5734
|
const { client, auth } = context;
|
|
@@ -5519,6 +5770,32 @@ function createRuntimeProfilesNamespace(context) {
|
|
|
5519
5770
|
path: { profileId }
|
|
5520
5771
|
});
|
|
5521
5772
|
if (result.error) unwrapResult(result);
|
|
5773
|
+
},
|
|
5774
|
+
async allowedTools(profileId, options) {
|
|
5775
|
+
return unwrapResult(await getRuntimeProfileAllowedTools({
|
|
5776
|
+
client,
|
|
5777
|
+
auth,
|
|
5778
|
+
path: { profileId },
|
|
5779
|
+
headers: requiredTeamHeaders(options)
|
|
5780
|
+
}));
|
|
5781
|
+
},
|
|
5782
|
+
async setPolicies(profileId, policyIds, options) {
|
|
5783
|
+
const result = await setRuntimeProfilePolicies({
|
|
5784
|
+
client,
|
|
5785
|
+
auth,
|
|
5786
|
+
path: { profileId },
|
|
5787
|
+
headers: requiredTeamHeaders(options),
|
|
5788
|
+
body: { policyIds }
|
|
5789
|
+
});
|
|
5790
|
+
if (result.error) unwrapResult(result);
|
|
5791
|
+
},
|
|
5792
|
+
async getPolicies(profileId, options) {
|
|
5793
|
+
return unwrapResult(await getRuntimeProfilePolicies({
|
|
5794
|
+
client,
|
|
5795
|
+
auth,
|
|
5796
|
+
path: { profileId },
|
|
5797
|
+
headers: requiredTeamHeaders(options)
|
|
5798
|
+
}));
|
|
5522
5799
|
}
|
|
5523
5800
|
};
|
|
5524
5801
|
}
|
|
@@ -10031,27 +10308,971 @@ _Object_({
|
|
|
10031
10308
|
additionalProperties: false
|
|
10032
10309
|
});
|
|
10033
10310
|
//#endregion
|
|
10034
|
-
//#region ../tasks/src/runtime-
|
|
10035
|
-
var
|
|
10311
|
+
//#region ../tasks/src/runtime-profile-context-recipes.ts
|
|
10312
|
+
var RUNTIME_PROFILE_CONTEXT_CATALOGUE = {
|
|
10313
|
+
version: 1,
|
|
10314
|
+
fragments: {
|
|
10315
|
+
"accountable-delivery-v1": {
|
|
10316
|
+
binding: "prompt_prefix",
|
|
10317
|
+
content: "# Accountable delivery\n\n- Pair every commit made during this task with a signed diary entry created by the `moltnet_create_entry` custom tool. Put the returned id in a `MoltNet-Diary: <id>` commit trailer.\n- Keep commit signing enabled; do not bypass the agent git configuration.\n- Push a branch and open or update a pull request only when the task asks for it. For GitHub mutations, use the credential-bound `GH_TOKEN` command form required by the runtime kernel.\n- Keep changes, commits, and any requested pull request coherent enough to review independently.",
|
|
10318
|
+
slug: "accountable-delivery-v1"
|
|
10319
|
+
},
|
|
10320
|
+
"judgment-diary-v1": {
|
|
10321
|
+
binding: "prompt_prefix",
|
|
10322
|
+
content: "# Judgment diary discipline\n\n- For an `assess_brief`, `judge_pack`, or `pr_review` task, create a signed diary entry with the `moltnet_create_entry` custom tool before submitting the structured judgment. Capture the rationale and evidence that support the verdict.\n- Add the `judgment` tag and the active task type tag (`assess_brief`, `judge_pack`, or `pr_review`). For `judge_pack`, also add `rubric:<rubricId>` from the task facts.\n- Do not use a shell `moltnet entry` command: task provenance is injected only by the custom tool.",
|
|
10323
|
+
slug: "judgment-diary-v1"
|
|
10324
|
+
},
|
|
10325
|
+
"proactive-memory-v1": {
|
|
10326
|
+
binding: "prompt_prefix",
|
|
10327
|
+
content: "# Proactive memory use\n\n- Before non-trivial investigation, debugging, code changes, or review, check the task diary for relevant prior knowledge instead of waiting for a human to ask. Use `moltnet_diary_tags` for cheap reconnaissance, `moltnet_list_entries` when tags or task provenance are known, and `moltnet_search_entries` for semantic similarity. Do not search randomly: pass `taskFilter` for task-local or correlation-local queries, and pass `tags` / `entryTypes` for broader prior-knowledge queries using known tags such as `incident`, `decision`, or `scope:<area>`. Broaden only after constrained searches miss.\n- Before creating an `episodic` incident entry, search for similar incidents using the proposed title, root cause, error text, affected subsystem, and watch-for terms, filtered by `entryTypes: [\"episodic\", \"semantic\"]` and any known `scope:*` or task-provenance tags. If a close prior match exists, do not create an isolated duplicate: reference the prior entry in your response or diary content, update or link it when the new occurrence adds material evidence, or create a new recurrence entry only when the recurrence itself is important signal.\n- When you create a recurrence entry, include the prior matching entry id(s) in the content and explain what is new about this occurrence.",
|
|
10328
|
+
slug: "proactive-memory-v1"
|
|
10329
|
+
},
|
|
10330
|
+
"run-eval-direct-v1": {
|
|
10331
|
+
binding: "prompt_prefix",
|
|
10332
|
+
content: "# Direct evaluation run\n\nThe supplied scenario, typed task facts, injected context, and registered submit-output tool are the complete task contract. Do not search diaries, create diary entries, modify a repository, commit, branch, push, or open a pull request unless a task fact explicitly requires it. Submit the agent-authored payload in the first turn; correction turns exist only to recover a rejected or missing submission.",
|
|
10333
|
+
slug: "run-eval-direct-v1"
|
|
10334
|
+
},
|
|
10335
|
+
"task-diary-discipline-v1": {
|
|
10336
|
+
binding: "prompt_prefix",
|
|
10337
|
+
content: "# Task diary discipline\n\n- During a daemon task, create diary entries only through the `moltnet_create_entry` custom tool. It binds entries to the current task diary and injects task, type, attempt, and correlation provenance tags.\n- Do not shell out to `moltnet entry create`, `moltnet entry create-signed`, or any other `moltnet entry` subcommand from bash while a task is running. Those paths bypass the custom tool's task-tag injection, so task-filtered diary queries cannot find the entry.\n- You may add useful tags, but do not try to replace task provenance supplied by the runtime.",
|
|
10338
|
+
slug: "task-diary-discipline-v1"
|
|
10339
|
+
},
|
|
10340
|
+
"verification-and-artifacts-v1": {
|
|
10341
|
+
binding: "prompt_prefix",
|
|
10342
|
+
content: "# Verification and artifacts\n\n- Run relevant verification before submitting. When task facts include `successCriteria`, assess them honestly in the generated verification contract; a fail or skip with evidence is better than a fabricated pass.\n- The registered submit-output tool owns the exact agent submission schema and validation recovery. Use that schema; do not invent a JSON shape in prose.\n- Upload large files, binary files, logs, reports, screenshots, traces, bundles, or datasets before submitting. Include artifact metadata only where the typed submit contract permits it.\n- If the task depends on prior artifacts, list and download the exact referenced artifact before judging or continuing that work.",
|
|
10343
|
+
slug: "verification-and-artifacts-v1"
|
|
10344
|
+
}
|
|
10345
|
+
},
|
|
10346
|
+
recipes: {
|
|
10347
|
+
"run-eval-direct@v1": {
|
|
10348
|
+
description: "Minimal direct context for a short, isolated evaluation run.",
|
|
10349
|
+
fragments: ["run-eval-direct-v1"]
|
|
10350
|
+
},
|
|
10351
|
+
"standard-engineering@v1": {
|
|
10352
|
+
description: "Full opt-in operating guidance for engineering tasks that need diary research, accountable delivery, and verification discipline.",
|
|
10353
|
+
fragments: [
|
|
10354
|
+
"proactive-memory-v1",
|
|
10355
|
+
"task-diary-discipline-v1",
|
|
10356
|
+
"accountable-delivery-v1",
|
|
10357
|
+
"judgment-diary-v1",
|
|
10358
|
+
"verification-and-artifacts-v1"
|
|
10359
|
+
]
|
|
10360
|
+
}
|
|
10361
|
+
}
|
|
10362
|
+
};
|
|
10363
|
+
function deepFreeze(value) {
|
|
10364
|
+
if (value && typeof value === "object") {
|
|
10365
|
+
for (const key of Object.keys(value)) deepFreeze(value[key]);
|
|
10366
|
+
Object.freeze(value);
|
|
10367
|
+
}
|
|
10368
|
+
return value;
|
|
10369
|
+
}
|
|
10370
|
+
deepFreeze(RUNTIME_PROFILE_CONTEXT_CATALOGUE);
|
|
10371
|
+
Object.freeze(Object.keys(RUNTIME_PROFILE_CONTEXT_CATALOGUE.recipes));
|
|
10372
|
+
//#endregion
|
|
10373
|
+
//#region ../models/src/preview-sign.ts
|
|
10374
|
+
function schemaRef$1(schema, id) {
|
|
10375
|
+
return Unsafe(Ref$2(id));
|
|
10376
|
+
}
|
|
10377
|
+
var PreviewSignBase64UrlSchema = String$1({
|
|
10378
|
+
$id: "PreviewSignBase64Url",
|
|
10036
10379
|
minLength: 1,
|
|
10037
|
-
maxLength:
|
|
10038
|
-
pattern: "^[
|
|
10380
|
+
maxLength: 5462,
|
|
10381
|
+
pattern: "^[A-Za-z0-9_-]+$"
|
|
10039
10382
|
});
|
|
10040
|
-
var
|
|
10041
|
-
|
|
10042
|
-
|
|
10043
|
-
|
|
10383
|
+
var PreviewSignSha256Base64UrlSchema = String$1({
|
|
10384
|
+
$id: "PreviewSignSha256Base64Url",
|
|
10385
|
+
minLength: 43,
|
|
10386
|
+
maxLength: 43,
|
|
10387
|
+
pattern: "^[A-Za-z0-9_-]+$"
|
|
10044
10388
|
});
|
|
10045
|
-
var
|
|
10046
|
-
|
|
10047
|
-
|
|
10048
|
-
|
|
10389
|
+
var PreviewSignP256DerSignatureBase64UrlSchema = String$1({
|
|
10390
|
+
$id: "PreviewSignP256DerSignatureBase64Url",
|
|
10391
|
+
minLength: 11,
|
|
10392
|
+
maxLength: 96,
|
|
10393
|
+
pattern: "^[A-Za-z0-9_-]+$"
|
|
10049
10394
|
});
|
|
10050
|
-
var
|
|
10051
|
-
Literal(
|
|
10052
|
-
Literal(
|
|
10053
|
-
Literal(
|
|
10054
|
-
|
|
10395
|
+
var PreviewSignEs256PublicKeySchema = _Object_({
|
|
10396
|
+
kty: Literal(2),
|
|
10397
|
+
algorithm: Literal(-7),
|
|
10398
|
+
curve: Literal(1),
|
|
10399
|
+
x: schemaRef$1(PreviewSignSha256Base64UrlSchema, "PreviewSignSha256Base64Url"),
|
|
10400
|
+
y: schemaRef$1(PreviewSignSha256Base64UrlSchema, "PreviewSignSha256Base64Url")
|
|
10401
|
+
}, {
|
|
10402
|
+
$id: "PreviewSignEs256PublicKey",
|
|
10403
|
+
additionalProperties: false
|
|
10404
|
+
});
|
|
10405
|
+
var PreviewSignEcdhEsHkdf256PublicKeySchema = _Object_({
|
|
10406
|
+
kty: Literal(2),
|
|
10407
|
+
algorithm: Literal(-25),
|
|
10408
|
+
curve: Literal(1),
|
|
10409
|
+
x: schemaRef$1(PreviewSignSha256Base64UrlSchema, "PreviewSignSha256Base64Url"),
|
|
10410
|
+
y: schemaRef$1(PreviewSignSha256Base64UrlSchema, "PreviewSignSha256Base64Url")
|
|
10411
|
+
}, {
|
|
10412
|
+
$id: "PreviewSignEcdhEsHkdf256PublicKey",
|
|
10413
|
+
additionalProperties: false
|
|
10414
|
+
});
|
|
10415
|
+
var PreviewSignEsp256PublicKeySchema = _Object_({
|
|
10416
|
+
kty: Literal(2),
|
|
10417
|
+
algorithm: Literal(-9),
|
|
10418
|
+
curve: Literal(1),
|
|
10419
|
+
x: schemaRef$1(PreviewSignSha256Base64UrlSchema, "PreviewSignSha256Base64Url"),
|
|
10420
|
+
y: schemaRef$1(PreviewSignSha256Base64UrlSchema, "PreviewSignSha256Base64Url")
|
|
10421
|
+
}, {
|
|
10422
|
+
$id: "PreviewSignEsp256PublicKey",
|
|
10423
|
+
additionalProperties: false
|
|
10424
|
+
});
|
|
10425
|
+
var PreviewSignArkgSeedPublicKeySchema = _Object_({
|
|
10426
|
+
kty: Literal(-65537),
|
|
10427
|
+
algorithm: Literal(-65700),
|
|
10428
|
+
derivedAlgorithm: Literal(-9),
|
|
10429
|
+
blindingKey: schemaRef$1(PreviewSignEs256PublicKeySchema, "PreviewSignEs256PublicKey"),
|
|
10430
|
+
kemKey: schemaRef$1(PreviewSignEcdhEsHkdf256PublicKeySchema, "PreviewSignEcdhEsHkdf256PublicKey")
|
|
10431
|
+
}, {
|
|
10432
|
+
$id: "PreviewSignArkgSeedPublicKey",
|
|
10433
|
+
additionalProperties: false
|
|
10434
|
+
});
|
|
10435
|
+
var PreviewSignPublicMaterialSchema = _Object_({
|
|
10436
|
+
version: Literal(1),
|
|
10437
|
+
outerCredentialId: schemaRef$1(PreviewSignBase64UrlSchema, "PreviewSignBase64Url"),
|
|
10438
|
+
outerPublicKey: schemaRef$1(PreviewSignEs256PublicKeySchema, "PreviewSignEs256PublicKey"),
|
|
10439
|
+
previewKeyHandle: schemaRef$1(PreviewSignBase64UrlSchema, "PreviewSignBase64Url"),
|
|
10440
|
+
seedPublicKey: schemaRef$1(PreviewSignArkgSeedPublicKeySchema, "PreviewSignArkgSeedPublicKey")
|
|
10441
|
+
}, {
|
|
10442
|
+
$id: "PreviewSignPublicMaterial",
|
|
10443
|
+
additionalProperties: false
|
|
10444
|
+
});
|
|
10445
|
+
var PreviewSignChallengeSchema = _Object_({
|
|
10446
|
+
verificationMethod: Literal("human-hardware-previewsign"),
|
|
10447
|
+
version: Literal(1),
|
|
10448
|
+
envelope: schemaRef$1(PreviewSignBase64UrlSchema, "PreviewSignBase64Url"),
|
|
10449
|
+
digest: schemaRef$1(PreviewSignSha256Base64UrlSchema, "PreviewSignSha256Base64Url"),
|
|
10450
|
+
additionalArguments: schemaRef$1(PreviewSignBase64UrlSchema, "PreviewSignBase64Url"),
|
|
10451
|
+
outerCredentialId: schemaRef$1(PreviewSignBase64UrlSchema, "PreviewSignBase64Url"),
|
|
10452
|
+
outerPublicKey: schemaRef$1(PreviewSignEs256PublicKeySchema, "PreviewSignEs256PublicKey"),
|
|
10453
|
+
previewKeyHandle: schemaRef$1(PreviewSignBase64UrlSchema, "PreviewSignBase64Url")
|
|
10454
|
+
}, {
|
|
10455
|
+
$id: "PreviewSignChallenge",
|
|
10456
|
+
additionalProperties: false
|
|
10457
|
+
});
|
|
10458
|
+
var PreviewSignChallengeValueSchema = _Object_({
|
|
10459
|
+
verificationMethod: Literal("human-hardware-previewsign"),
|
|
10460
|
+
value: schemaRef$1(PreviewSignChallengeSchema, "PreviewSignChallenge")
|
|
10461
|
+
}, {
|
|
10462
|
+
$id: "PreviewSignChallengeValue",
|
|
10463
|
+
additionalProperties: false
|
|
10464
|
+
});
|
|
10465
|
+
var PreviewSignChallengeOperationSchema = Union([Literal("credential-registration"), Literal("signing-request")], { $id: "PreviewSignChallengeOperation" });
|
|
10466
|
+
var PreviewSignReceiptSchema = _Object_({
|
|
10467
|
+
version: Literal(1),
|
|
10468
|
+
signature: schemaRef$1(PreviewSignP256DerSignatureBase64UrlSchema, "PreviewSignP256DerSignatureBase64Url")
|
|
10469
|
+
}, {
|
|
10470
|
+
$id: "PreviewSignReceipt",
|
|
10471
|
+
additionalProperties: false
|
|
10472
|
+
});
|
|
10473
|
+
var PreviewSignReceiptValueSchema = _Object_({
|
|
10474
|
+
verificationMethod: Literal("human-hardware-previewsign"),
|
|
10475
|
+
value: schemaRef$1(PreviewSignReceiptSchema, "PreviewSignReceipt")
|
|
10476
|
+
}, {
|
|
10477
|
+
$id: "PreviewSignReceiptValue",
|
|
10478
|
+
additionalProperties: false
|
|
10479
|
+
});
|
|
10480
|
+
var previewSignSchemaContext = {
|
|
10481
|
+
PreviewSignBase64Url: PreviewSignBase64UrlSchema,
|
|
10482
|
+
PreviewSignSha256Base64Url: PreviewSignSha256Base64UrlSchema,
|
|
10483
|
+
PreviewSignP256DerSignatureBase64Url: PreviewSignP256DerSignatureBase64UrlSchema,
|
|
10484
|
+
PreviewSignEs256PublicKey: PreviewSignEs256PublicKeySchema,
|
|
10485
|
+
PreviewSignEcdhEsHkdf256PublicKey: PreviewSignEcdhEsHkdf256PublicKeySchema,
|
|
10486
|
+
PreviewSignEsp256PublicKey: PreviewSignEsp256PublicKeySchema,
|
|
10487
|
+
PreviewSignArkgSeedPublicKey: PreviewSignArkgSeedPublicKeySchema,
|
|
10488
|
+
PreviewSignPublicMaterial: PreviewSignPublicMaterialSchema,
|
|
10489
|
+
PreviewSignChallenge: PreviewSignChallengeSchema,
|
|
10490
|
+
PreviewSignChallengeValue: PreviewSignChallengeValueSchema,
|
|
10491
|
+
PreviewSignChallengeOperation: PreviewSignChallengeOperationSchema,
|
|
10492
|
+
PreviewSignReceipt: PreviewSignReceiptSchema,
|
|
10493
|
+
PreviewSignReceiptValue: PreviewSignReceiptValueSchema
|
|
10494
|
+
};
|
|
10495
|
+
//#endregion
|
|
10496
|
+
//#region ../models/src/verification-method.ts
|
|
10497
|
+
/**
|
|
10498
|
+
* Persisted and wire-level signing verification method identifiers.
|
|
10499
|
+
*
|
|
10500
|
+
* This vocabulary is append-only. Never rename, remove, or change an existing
|
|
10501
|
+
* value: PostgreSQL rows, workflow inputs, and API clients persist these exact
|
|
10502
|
+
* strings. Future signing methods must add a new property and value.
|
|
10503
|
+
*/
|
|
10504
|
+
var VERIFICATION_METHOD = {
|
|
10505
|
+
AgentEd25519: "agent-ed25519",
|
|
10506
|
+
HumanHardwarePreviewSign: "human-hardware-previewsign"
|
|
10507
|
+
};
|
|
10508
|
+
VERIFICATION_METHOD.AgentEd25519, VERIFICATION_METHOD.HumanHardwarePreviewSign;
|
|
10509
|
+
//#endregion
|
|
10510
|
+
//#region ../models/src/schemas.ts
|
|
10511
|
+
var UuidSchema = String$1({
|
|
10512
|
+
format: "uuid",
|
|
10513
|
+
description: "UUID v4 identifier"
|
|
10514
|
+
});
|
|
10515
|
+
var TimestampSchema = String$1({
|
|
10516
|
+
format: "date-time",
|
|
10517
|
+
description: "ISO 8601 timestamp"
|
|
10518
|
+
});
|
|
10519
|
+
Union([Literal(VERIFICATION_METHOD.AgentEd25519), Literal(VERIFICATION_METHOD.HumanHardwarePreviewSign)], { description: "Stable signing verification method identifier" });
|
|
10520
|
+
Union([
|
|
10521
|
+
Literal("private"),
|
|
10522
|
+
Literal("moltnet"),
|
|
10523
|
+
Literal("public")
|
|
10524
|
+
], { description: "Entry visibility level" });
|
|
10525
|
+
var ENTRY_TYPE_VALUES = [
|
|
10526
|
+
"episodic",
|
|
10527
|
+
"semantic",
|
|
10528
|
+
"procedural",
|
|
10529
|
+
"reflection"
|
|
10530
|
+
];
|
|
10531
|
+
var EntryTypeSchema = Union([
|
|
10532
|
+
Literal("episodic"),
|
|
10533
|
+
Literal("semantic"),
|
|
10534
|
+
Literal("procedural"),
|
|
10535
|
+
Literal("reflection")
|
|
10536
|
+
], { description: "Entry memory type" });
|
|
10537
|
+
/** Regex fragment matching a single entry type value. */
|
|
10538
|
+
var ENTRY_TYPE_PATTERN = `(${ENTRY_TYPE_VALUES.join("|")})`;
|
|
10539
|
+
`${ENTRY_TYPE_PATTERN}${ENTRY_TYPE_PATTERN}`, ENTRY_TYPE_VALUES.length - 1;
|
|
10540
|
+
var PublicKeySchema = String$1({
|
|
10541
|
+
pattern: "^ed25519:[A-Za-z0-9+/=]+$",
|
|
10542
|
+
description: "Ed25519 public key with prefix"
|
|
10543
|
+
});
|
|
10544
|
+
var FingerprintSchema = String$1({
|
|
10545
|
+
pattern: "^[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}$",
|
|
10546
|
+
description: "Key fingerprint (A1B2-C3D4-E5F6-G7H8)"
|
|
10547
|
+
});
|
|
10548
|
+
_Object_({
|
|
10549
|
+
title: Optional(String$1({ maxLength: 255 })),
|
|
10550
|
+
content: String$1({
|
|
10551
|
+
minLength: 1,
|
|
10552
|
+
maxLength: 1e5
|
|
10553
|
+
}),
|
|
10554
|
+
tags: Optional(_Array_(String$1({ maxLength: 128 }), { maxItems: 20 }))
|
|
10555
|
+
});
|
|
10556
|
+
_Object_({
|
|
10557
|
+
title: Optional(String$1({ maxLength: 255 })),
|
|
10558
|
+
content: Optional(String$1({
|
|
10559
|
+
minLength: 1,
|
|
10560
|
+
maxLength: 1e5
|
|
10561
|
+
})),
|
|
10562
|
+
tags: Optional(_Array_(String$1({ maxLength: 128 }), { maxItems: 20 }))
|
|
10563
|
+
});
|
|
10564
|
+
_Object_({
|
|
10565
|
+
query: Optional(String$1({
|
|
10566
|
+
minLength: 1,
|
|
10567
|
+
maxLength: 500
|
|
10568
|
+
})),
|
|
10569
|
+
tags: Optional(_Array_(String$1({ maxLength: 128 }), {
|
|
10570
|
+
minItems: 1,
|
|
10571
|
+
maxItems: 20,
|
|
10572
|
+
description: "Filter: entry must have ALL specified tags"
|
|
10573
|
+
})),
|
|
10574
|
+
limit: Optional(Number$1({
|
|
10575
|
+
minimum: 1,
|
|
10576
|
+
maximum: 100,
|
|
10577
|
+
default: 20
|
|
10578
|
+
})),
|
|
10579
|
+
offset: Optional(Number$1({
|
|
10580
|
+
minimum: 0,
|
|
10581
|
+
default: 0
|
|
10582
|
+
}))
|
|
10583
|
+
});
|
|
10584
|
+
_Object_({
|
|
10585
|
+
identityId: UuidSchema,
|
|
10586
|
+
publicKey: PublicKeySchema,
|
|
10587
|
+
fingerprint: FingerprintSchema,
|
|
10588
|
+
createdAt: TimestampSchema
|
|
10589
|
+
});
|
|
10590
|
+
_Object_({
|
|
10591
|
+
publicKey: PublicKeySchema,
|
|
10592
|
+
fingerprint: FingerprintSchema
|
|
10593
|
+
});
|
|
10594
|
+
_Object_({ message: String$1({
|
|
10595
|
+
minLength: 1,
|
|
10596
|
+
maxLength: 1e4
|
|
10597
|
+
}) });
|
|
10598
|
+
_Object_({
|
|
10599
|
+
message: String$1(),
|
|
10600
|
+
signature: String$1({ description: "Base64 encoded Ed25519 signature" }),
|
|
10601
|
+
publicKey: PublicKeySchema
|
|
10602
|
+
});
|
|
10603
|
+
_Object_({
|
|
10604
|
+
message: String$1({
|
|
10605
|
+
minLength: 1,
|
|
10606
|
+
maxLength: 1e4
|
|
10607
|
+
}),
|
|
10608
|
+
signature: String$1({ description: "Base64 encoded signature" }),
|
|
10609
|
+
publicKey: PublicKeySchema
|
|
10610
|
+
});
|
|
10611
|
+
_Object_({
|
|
10612
|
+
valid: Boolean$1(),
|
|
10613
|
+
signer: Optional(_Object_({ fingerprint: FingerprintSchema }))
|
|
10614
|
+
});
|
|
10615
|
+
var BaseAuthContextSchema = _Object_({
|
|
10616
|
+
identityId: UuidSchema,
|
|
10617
|
+
scopes: _Array_(String$1()),
|
|
10618
|
+
subjectType: Union([Literal("agent"), Literal("human")]),
|
|
10619
|
+
currentTeamId: Union([UuidSchema, Null()])
|
|
10620
|
+
});
|
|
10621
|
+
Union([Intersect([BaseAuthContextSchema, _Object_({
|
|
10622
|
+
subjectType: Literal("agent"),
|
|
10623
|
+
publicKey: PublicKeySchema,
|
|
10624
|
+
fingerprint: FingerprintSchema,
|
|
10625
|
+
clientId: String$1()
|
|
10626
|
+
})]), Intersect([BaseAuthContextSchema, _Object_({
|
|
10627
|
+
subjectType: Literal("human"),
|
|
10628
|
+
clientId: Union([String$1(), Null()])
|
|
10629
|
+
})])]);
|
|
10630
|
+
_Object_({
|
|
10631
|
+
success: Boolean$1(),
|
|
10632
|
+
message: Optional(String$1())
|
|
10633
|
+
});
|
|
10634
|
+
_Object_({ diaryId: UuidSchema });
|
|
10635
|
+
_Object_({
|
|
10636
|
+
diaryId: UuidSchema,
|
|
10637
|
+
entryId: UuidSchema
|
|
10638
|
+
});
|
|
10639
|
+
_Object_({ entryId: UuidSchema });
|
|
10640
|
+
_Object_({ id: UuidSchema });
|
|
10641
|
+
_Object_({
|
|
10642
|
+
publicKey: PublicKeySchema,
|
|
10643
|
+
fingerprint: FingerprintSchema,
|
|
10644
|
+
agentName: String$1({
|
|
10645
|
+
minLength: 1,
|
|
10646
|
+
maxLength: 34
|
|
10647
|
+
}),
|
|
10648
|
+
org: Optional(String$1({
|
|
10649
|
+
minLength: 1,
|
|
10650
|
+
maxLength: 39,
|
|
10651
|
+
pattern: "^[a-zA-Z0-9-]+$",
|
|
10652
|
+
description: "GitHub organization name. When provided, the GitHub App will be created under this org instead of the personal account."
|
|
10653
|
+
}))
|
|
10654
|
+
});
|
|
10655
|
+
_Object_({
|
|
10656
|
+
workflowId: String$1(),
|
|
10657
|
+
manifestFormUrl: String$1()
|
|
10658
|
+
});
|
|
10659
|
+
_Object_({
|
|
10660
|
+
status: Union([
|
|
10661
|
+
Literal("awaiting_github"),
|
|
10662
|
+
Literal("github_code_ready"),
|
|
10663
|
+
Literal("awaiting_installation"),
|
|
10664
|
+
Literal("completed"),
|
|
10665
|
+
Literal("failed")
|
|
10666
|
+
]),
|
|
10667
|
+
githubCode: Optional(String$1()),
|
|
10668
|
+
identityId: Optional(String$1()),
|
|
10669
|
+
clientId: Optional(String$1()),
|
|
10670
|
+
clientSecret: Optional(String$1()),
|
|
10671
|
+
installationId: Optional(String$1())
|
|
10672
|
+
});
|
|
10673
|
+
_Object_({
|
|
10674
|
+
wf: String$1({
|
|
10675
|
+
minLength: 1,
|
|
10676
|
+
description: "Workflow ID baked into setup_url"
|
|
10677
|
+
}),
|
|
10678
|
+
installation_id: String$1({ minLength: 1 }),
|
|
10679
|
+
setup_action: Optional(String$1())
|
|
10680
|
+
});
|
|
10681
|
+
_Object_({ id: UuidSchema });
|
|
10682
|
+
_Object_({
|
|
10683
|
+
id: UuidSchema,
|
|
10684
|
+
subjectId: UuidSchema
|
|
10685
|
+
});
|
|
10686
|
+
_Object_({
|
|
10687
|
+
id: UuidSchema,
|
|
10688
|
+
inviteId: UuidSchema
|
|
10689
|
+
});
|
|
10690
|
+
_Object_({ name: String$1({
|
|
10691
|
+
minLength: 1,
|
|
10692
|
+
maxLength: 255
|
|
10693
|
+
}) });
|
|
10694
|
+
_Object_({
|
|
10695
|
+
role: Optional(Union([Literal("manager"), Literal("member")])),
|
|
10696
|
+
maxUses: Optional(Integer({
|
|
10697
|
+
minimum: 1,
|
|
10698
|
+
default: 1
|
|
10699
|
+
})),
|
|
10700
|
+
expiresInHours: Optional(Integer({
|
|
10701
|
+
minimum: 1,
|
|
10702
|
+
maximum: 720,
|
|
10703
|
+
default: 168
|
|
10704
|
+
}))
|
|
10705
|
+
});
|
|
10706
|
+
_Object_({ code: String$1({ minLength: 1 }) });
|
|
10707
|
+
_Object_({ role: Union([Literal("manager"), Literal("member")]) });
|
|
10708
|
+
var TeamRoleSchema = Union([
|
|
10709
|
+
Literal("owner"),
|
|
10710
|
+
Literal("manager"),
|
|
10711
|
+
Literal("member")
|
|
10712
|
+
]);
|
|
10713
|
+
_Object_({
|
|
10714
|
+
id: UuidSchema,
|
|
10715
|
+
name: String$1()
|
|
10716
|
+
});
|
|
10717
|
+
var DateTimeUnsafe = Unsafe(String$1({ format: "date-time" }));
|
|
10718
|
+
_Object_({
|
|
10719
|
+
id: UuidSchema,
|
|
10720
|
+
code: String$1(),
|
|
10721
|
+
role: Union([Literal("manager"), Literal("member")]),
|
|
10722
|
+
maxUses: Integer(),
|
|
10723
|
+
useCount: Integer(),
|
|
10724
|
+
expiresAt: DateTimeUnsafe,
|
|
10725
|
+
createdAt: DateTimeUnsafe
|
|
10726
|
+
});
|
|
10727
|
+
var TeamMemberSchema = _Object_({
|
|
10728
|
+
subjectId: UuidSchema,
|
|
10729
|
+
subjectType: Union([Literal("agent"), Literal("human")]),
|
|
10730
|
+
role: TeamRoleSchema,
|
|
10731
|
+
displayName: String$1(),
|
|
10732
|
+
fingerprint: Optional(String$1()),
|
|
10733
|
+
email: Optional(String$1())
|
|
10734
|
+
});
|
|
10735
|
+
_Object_({
|
|
10736
|
+
id: UuidSchema,
|
|
10737
|
+
name: String$1(),
|
|
10738
|
+
personal: Boolean$1(),
|
|
10739
|
+
status: String$1(),
|
|
10740
|
+
role: TeamRoleSchema
|
|
10741
|
+
});
|
|
10742
|
+
_Object_({
|
|
10743
|
+
id: UuidSchema,
|
|
10744
|
+
name: String$1(),
|
|
10745
|
+
status: String$1(),
|
|
10746
|
+
personal: Boolean$1(),
|
|
10747
|
+
createdAt: DateTimeUnsafe,
|
|
10748
|
+
updatedAt: DateTimeUnsafe,
|
|
10749
|
+
members: _Array_(TeamMemberSchema)
|
|
10750
|
+
});
|
|
10751
|
+
_Object_({
|
|
10752
|
+
teamId: UuidSchema,
|
|
10753
|
+
role: Union([Literal("manager"), Literal("member")])
|
|
10754
|
+
});
|
|
10755
|
+
_Object_({
|
|
10756
|
+
updated: Boolean$1(),
|
|
10757
|
+
role: Union([Literal("manager"), Literal("member")])
|
|
10758
|
+
});
|
|
10759
|
+
_Object_({ deleted: Boolean$1() });
|
|
10760
|
+
_Object_({ removed: Boolean$1() });
|
|
10761
|
+
var FoundingMemberSchema = _Object_({
|
|
10762
|
+
subjectId: UuidSchema,
|
|
10763
|
+
subjectNs: Union([Literal("Agent"), Literal("Human")]),
|
|
10764
|
+
role: Union([
|
|
10765
|
+
Literal("owner"),
|
|
10766
|
+
Literal("manager"),
|
|
10767
|
+
Literal("member")
|
|
10768
|
+
])
|
|
10769
|
+
});
|
|
10770
|
+
_Object_({
|
|
10771
|
+
name: String$1({
|
|
10772
|
+
minLength: 1,
|
|
10773
|
+
maxLength: 255
|
|
10774
|
+
}),
|
|
10775
|
+
foundingMembers: Optional(_Array_(FoundingMemberSchema, { minItems: 1 }))
|
|
10776
|
+
});
|
|
10777
|
+
_Object_({
|
|
10778
|
+
id: UuidSchema,
|
|
10779
|
+
name: String$1(),
|
|
10780
|
+
status: String$1(),
|
|
10781
|
+
workflowId: Optional(String$1())
|
|
10782
|
+
});
|
|
10783
|
+
_Object_({});
|
|
10784
|
+
_Object_({
|
|
10785
|
+
accepted: Boolean$1(),
|
|
10786
|
+
teamStatus: String$1()
|
|
10787
|
+
});
|
|
10788
|
+
_Object_({ destinationTeamId: UuidSchema });
|
|
10789
|
+
_Object_({ transferId: UuidSchema });
|
|
10790
|
+
_Object_({ items: _Array_(_Object_({
|
|
10791
|
+
id: UuidSchema,
|
|
10792
|
+
diaryId: UuidSchema,
|
|
10793
|
+
sourceTeamId: UuidSchema,
|
|
10794
|
+
destinationTeamId: UuidSchema,
|
|
10795
|
+
status: String$1(),
|
|
10796
|
+
initiatedBy: UuidSchema,
|
|
10797
|
+
expiresAt: Unsafe(String$1({ format: "date-time" })),
|
|
10798
|
+
createdAt: Unsafe(String$1({ format: "date-time" }))
|
|
10799
|
+
})) });
|
|
10800
|
+
_Object_({ groupId: UuidSchema });
|
|
10801
|
+
_Object_({
|
|
10802
|
+
groupId: UuidSchema,
|
|
10803
|
+
subjectId: UuidSchema
|
|
10804
|
+
});
|
|
10805
|
+
_Object_({ name: String$1({
|
|
10806
|
+
minLength: 1,
|
|
10807
|
+
maxLength: 255
|
|
10808
|
+
}) });
|
|
10809
|
+
_Object_({
|
|
10810
|
+
subjectId: UuidSchema,
|
|
10811
|
+
subjectNs: Optional(Union([Literal("Agent"), Literal("Human")]))
|
|
10812
|
+
});
|
|
10813
|
+
_Object_({
|
|
10814
|
+
id: UuidSchema,
|
|
10815
|
+
name: String$1(),
|
|
10816
|
+
teamId: UuidSchema
|
|
10817
|
+
});
|
|
10818
|
+
var GroupMemberResponseSchema = _Object_({
|
|
10819
|
+
subjectId: UuidSchema,
|
|
10820
|
+
subjectNs: String$1()
|
|
10821
|
+
});
|
|
10822
|
+
_Object_({
|
|
10823
|
+
id: UuidSchema,
|
|
10824
|
+
name: String$1(),
|
|
10825
|
+
teamId: UuidSchema,
|
|
10826
|
+
createdAt: DateTimeUnsafe,
|
|
10827
|
+
members: _Array_(GroupMemberResponseSchema)
|
|
10828
|
+
});
|
|
10829
|
+
var DiaryGrantRoleSchema = Union([Literal("writer"), Literal("manager")]);
|
|
10830
|
+
var GrantSubjectNsSchema = Union([
|
|
10831
|
+
Literal("Agent"),
|
|
10832
|
+
Literal("Human"),
|
|
10833
|
+
Literal("Group")
|
|
10834
|
+
]);
|
|
10835
|
+
_Object_({
|
|
10836
|
+
subjectId: UuidSchema,
|
|
10837
|
+
subjectNs: GrantSubjectNsSchema,
|
|
10838
|
+
role: DiaryGrantRoleSchema
|
|
10839
|
+
});
|
|
10840
|
+
_Object_({
|
|
10841
|
+
subjectId: UuidSchema,
|
|
10842
|
+
subjectNs: GrantSubjectNsSchema,
|
|
10843
|
+
role: DiaryGrantRoleSchema
|
|
10844
|
+
});
|
|
10845
|
+
_Object_({ grants: _Array_(_Object_({
|
|
10846
|
+
subjectId: UuidSchema,
|
|
10847
|
+
subjectNs: GrantSubjectNsSchema,
|
|
10848
|
+
role: DiaryGrantRoleSchema
|
|
10849
|
+
})) });
|
|
10850
|
+
_Object_({ revoked: Boolean$1() });
|
|
10851
|
+
_Object_({ "x-moltnet-team-id": String$1({
|
|
10852
|
+
format: "uuid",
|
|
10853
|
+
description: "Team ID (UUID) that will own the resource. Required."
|
|
10854
|
+
}) });
|
|
10855
|
+
_Object_({ "x-moltnet-team-id": Optional(String$1({
|
|
10856
|
+
format: "uuid",
|
|
10857
|
+
description: "Team ID (UUID) for scoping the request. Optional."
|
|
10858
|
+
})) });
|
|
10859
|
+
_Object_({
|
|
10860
|
+
kind: Literal("agent"),
|
|
10861
|
+
identityId: UuidSchema,
|
|
10862
|
+
fingerprint: FingerprintSchema,
|
|
10863
|
+
publicKey: PublicKeySchema
|
|
10864
|
+
}, {
|
|
10865
|
+
$id: "AgentPrincipal",
|
|
10866
|
+
additionalProperties: false
|
|
10867
|
+
});
|
|
10868
|
+
_Object_({
|
|
10869
|
+
kind: Literal("human"),
|
|
10870
|
+
humanId: UuidSchema,
|
|
10871
|
+
identityId: Union([UuidSchema, Null()])
|
|
10872
|
+
}, {
|
|
10873
|
+
$id: "HumanPrincipal",
|
|
10874
|
+
additionalProperties: false
|
|
10875
|
+
});
|
|
10876
|
+
var principalUnionVariants = [_Object_({
|
|
10877
|
+
kind: Literal("agent"),
|
|
10878
|
+
identityId: UuidSchema,
|
|
10879
|
+
fingerprint: FingerprintSchema,
|
|
10880
|
+
publicKey: PublicKeySchema
|
|
10881
|
+
}, { additionalProperties: false }), _Object_({
|
|
10882
|
+
kind: Literal("human"),
|
|
10883
|
+
humanId: UuidSchema,
|
|
10884
|
+
identityId: Union([UuidSchema, Null()])
|
|
10885
|
+
}, { additionalProperties: false })];
|
|
10886
|
+
Union(principalUnionVariants, {
|
|
10887
|
+
$id: "PrincipalIdentity",
|
|
10888
|
+
discriminator: { propertyName: "kind" }
|
|
10889
|
+
});
|
|
10890
|
+
/**
|
|
10891
|
+
* `$id`-less twin of `PrincipalIdentitySchema`. Required anywhere the
|
|
10892
|
+
* schema is **embedded** inline into another schema (MCP `outputSchema`
|
|
10893
|
+
* — every tool that returns a creator-bearing object embeds its own
|
|
10894
|
+
* copy; provenance-graph node `meta.creator`, etc.). Ajv 8 throws
|
|
10895
|
+
* `reference "PrincipalIdentity" resolves to more than one schema` if
|
|
10896
|
+
* the same `$id` appears twice in the same compilation pass, which is
|
|
10897
|
+
* exactly what happens when the MCP server lists tools and Ajv
|
|
10898
|
+
* traverses every advertised `outputSchema`.
|
|
10899
|
+
*
|
|
10900
|
+
* Structurally identical to `PrincipalIdentitySchema` (they share the
|
|
10901
|
+
* variants array); change one, change both.
|
|
10902
|
+
*/
|
|
10903
|
+
var PrincipalIdentitySchemaInline = Union(principalUnionVariants, { discriminator: { propertyName: "kind" } });
|
|
10904
|
+
//#endregion
|
|
10905
|
+
//#region ../models/src/problem-details.ts
|
|
10906
|
+
var ProblemCodeSchema = Union([
|
|
10907
|
+
Literal("UNAUTHORIZED"),
|
|
10908
|
+
Literal("FORBIDDEN"),
|
|
10909
|
+
Literal("NOT_FOUND"),
|
|
10910
|
+
Literal("CONFLICT"),
|
|
10911
|
+
Literal("UNSUPPORTED_MEDIA_TYPE"),
|
|
10912
|
+
Literal("VALIDATION_FAILED"),
|
|
10913
|
+
Literal("INVALID_CHALLENGE"),
|
|
10914
|
+
Literal("INVALID_SIGNATURE"),
|
|
10915
|
+
Literal("VOUCHER_LIMIT"),
|
|
10916
|
+
Literal("RATE_LIMIT_EXCEEDED"),
|
|
10917
|
+
Literal("SERIALIZATION_EXHAUSTED"),
|
|
10918
|
+
Literal("SIGNING_REQUEST_EXPIRED"),
|
|
10919
|
+
Literal("SIGNING_REQUEST_ALREADY_COMPLETED"),
|
|
10920
|
+
Literal("SIGNING_REQUEST_LIMIT_REACHED"),
|
|
10921
|
+
Literal("REGISTRATION_FAILED"),
|
|
10922
|
+
Literal("UPSTREAM_ERROR"),
|
|
10923
|
+
Literal("SERVICE_UNAVAILABLE"),
|
|
10924
|
+
Literal("INTERNAL_SERVER_ERROR"),
|
|
10925
|
+
Literal("TEAM_PERSONAL_IMMUTABLE"),
|
|
10926
|
+
Literal("TEAM_NOT_ACTIVE"),
|
|
10927
|
+
Literal("INVITE_EXPIRED"),
|
|
10928
|
+
Literal("INVITE_EXHAUSTED"),
|
|
10929
|
+
Literal("TEAM_LAST_OWNER"),
|
|
10930
|
+
Literal("TEAM_ALREADY_ACTIVE"),
|
|
10931
|
+
Literal("TEAM_NOT_FOUNDING"),
|
|
10932
|
+
Literal("FOUNDING_ALREADY_ACCEPTED"),
|
|
10933
|
+
Literal("DIARY_TRANSFER_PENDING"),
|
|
10934
|
+
Literal("DIARY_TRANSFER_NOT_FOUND"),
|
|
10935
|
+
Literal("DIARY_TRANSFER_ALREADY_RESOLVED")
|
|
10936
|
+
]);
|
|
10937
|
+
var ProblemDetailsSchema = _Object_({
|
|
10938
|
+
type: String$1({ format: "uri" }),
|
|
10939
|
+
title: String$1(),
|
|
10940
|
+
status: Integer({
|
|
10941
|
+
minimum: 100,
|
|
10942
|
+
maximum: 599
|
|
10943
|
+
}),
|
|
10944
|
+
code: ProblemCodeSchema,
|
|
10945
|
+
detail: Optional(String$1()),
|
|
10946
|
+
instance: Optional(String$1())
|
|
10947
|
+
}, {
|
|
10948
|
+
$id: "ProblemDetails",
|
|
10949
|
+
additionalProperties: true
|
|
10950
|
+
});
|
|
10951
|
+
_Object_({
|
|
10952
|
+
field: String$1(),
|
|
10953
|
+
message: String$1(),
|
|
10954
|
+
code: Optional(String$1())
|
|
10955
|
+
}, {
|
|
10956
|
+
$id: "ValidationError",
|
|
10957
|
+
additionalProperties: false
|
|
10958
|
+
});
|
|
10959
|
+
_Object_({
|
|
10960
|
+
resource: String$1(),
|
|
10961
|
+
id: Optional(String$1({ format: "uuid" })),
|
|
10962
|
+
keys: Optional(Record(String$1(), String$1()))
|
|
10963
|
+
}, {
|
|
10964
|
+
$id: "ConflictTarget",
|
|
10965
|
+
additionalProperties: false
|
|
10966
|
+
});
|
|
10967
|
+
_Object_({
|
|
10968
|
+
constraint: Optional(String$1()),
|
|
10969
|
+
target: Optional(Ref$2("ConflictTarget"))
|
|
10970
|
+
}, {
|
|
10971
|
+
$id: "ConflictError",
|
|
10972
|
+
additionalProperties: false
|
|
10973
|
+
});
|
|
10974
|
+
var ConflictProblemDetailsSchema = Intersect([ProblemDetailsSchema, _Object_({ conflict: Ref$2("ConflictError") })], { $id: "ConflictProblemDetails" });
|
|
10975
|
+
_Object_({
|
|
10976
|
+
type: String$1(),
|
|
10977
|
+
severity: Number$1(),
|
|
10978
|
+
match: String$1()
|
|
10979
|
+
}, {
|
|
10980
|
+
$id: "InjectionThreat",
|
|
10981
|
+
additionalProperties: false
|
|
10982
|
+
});
|
|
10983
|
+
Intersect([ConflictProblemDetailsSchema, _Object_({ flagged: Optional(_Array_(_Object_({
|
|
10984
|
+
id: String$1({ format: "uuid" }),
|
|
10985
|
+
threats: _Array_(Ref$2("InjectionThreat"))
|
|
10986
|
+
}, { additionalProperties: false }))) })], { $id: "InjectionConflictProblemDetails" });
|
|
10987
|
+
Intersect([ProblemDetailsSchema, _Object_({ errors: _Array_(Ref$2("ValidationError")) })], { $id: "ValidationProblemDetails" });
|
|
10988
|
+
Union([
|
|
10989
|
+
Literal("pack"),
|
|
10990
|
+
Literal("entry"),
|
|
10991
|
+
Literal("rendered_pack")
|
|
10992
|
+
]);
|
|
10993
|
+
var ProvenanceGraphEdgeKindSchema = Union([
|
|
10994
|
+
Literal("includes"),
|
|
10995
|
+
Literal("supersedes"),
|
|
10996
|
+
Literal("rendered_from")
|
|
10997
|
+
]);
|
|
10998
|
+
var ProvenanceGraphPackMetaSchema = _Object_({
|
|
10999
|
+
packId: UuidSchema,
|
|
11000
|
+
diaryId: UuidSchema,
|
|
11001
|
+
packCid: String$1(),
|
|
11002
|
+
packType: String$1(),
|
|
11003
|
+
packCodec: String$1(),
|
|
11004
|
+
pinned: Boolean$1(),
|
|
11005
|
+
createdAt: TimestampSchema,
|
|
11006
|
+
expiresAt: Union([TimestampSchema, Null()]),
|
|
11007
|
+
supersedesPackId: Union([UuidSchema, Null()])
|
|
11008
|
+
});
|
|
11009
|
+
/**
|
|
11010
|
+
* Discriminated creator embedded inside provenance-node response
|
|
11011
|
+
* payloads. Re-uses the shared `PrincipalIdentitySchemaInline` (the
|
|
11012
|
+
* `$id`-less twin) — embedding the named `PrincipalIdentitySchema`
|
|
11013
|
+
* here would clash with the top-level registration via @fastify/swagger
|
|
11014
|
+
* (`reference "PrincipalIdentity" resolves to more than one schema`).
|
|
11015
|
+
*/
|
|
11016
|
+
var ProvenanceGraphCreatorSchema = PrincipalIdentitySchemaInline;
|
|
11017
|
+
var ProvenanceGraphEntryMetaSchema = _Object_({
|
|
11018
|
+
entryId: UuidSchema,
|
|
11019
|
+
diaryId: UuidSchema,
|
|
11020
|
+
entryType: EntryTypeSchema,
|
|
11021
|
+
contentHash: Union([String$1(), Null()]),
|
|
11022
|
+
createdAt: TimestampSchema,
|
|
11023
|
+
updatedAt: TimestampSchema,
|
|
11024
|
+
signed: Boolean$1(),
|
|
11025
|
+
title: Union([String$1(), Null()]),
|
|
11026
|
+
tags: _Array_(String$1()),
|
|
11027
|
+
creator: Optional(ProvenanceGraphCreatorSchema)
|
|
11028
|
+
});
|
|
11029
|
+
var ProvenanceGraphPackNodeSchema = _Object_({
|
|
11030
|
+
id: String$1(),
|
|
11031
|
+
kind: Literal("pack"),
|
|
11032
|
+
label: String$1(),
|
|
11033
|
+
cid: Union([String$1(), Null()]),
|
|
11034
|
+
meta: Intersect([ProvenanceGraphPackMetaSchema, _Object_({ creator: Optional(ProvenanceGraphCreatorSchema) })])
|
|
11035
|
+
});
|
|
11036
|
+
var ProvenanceGraphEntryNodeSchema = _Object_({
|
|
11037
|
+
id: String$1(),
|
|
11038
|
+
kind: Literal("entry"),
|
|
11039
|
+
label: String$1(),
|
|
11040
|
+
cid: Union([String$1(), Null()]),
|
|
11041
|
+
meta: ProvenanceGraphEntryMetaSchema
|
|
11042
|
+
});
|
|
11043
|
+
var ProvenanceGraphRenderedPackMetaSchema = _Object_({
|
|
11044
|
+
renderedPackId: UuidSchema,
|
|
11045
|
+
sourcePackId: UuidSchema,
|
|
11046
|
+
diaryId: UuidSchema,
|
|
11047
|
+
packCid: String$1(),
|
|
11048
|
+
renderMethod: String$1(),
|
|
11049
|
+
totalTokens: Number$1(),
|
|
11050
|
+
pinned: Boolean$1(),
|
|
11051
|
+
createdAt: TimestampSchema,
|
|
11052
|
+
expiresAt: Union([TimestampSchema, Null()]),
|
|
11053
|
+
creator: Optional(ProvenanceGraphCreatorSchema)
|
|
11054
|
+
});
|
|
11055
|
+
var ProvenanceGraphNodeSchema = Union([
|
|
11056
|
+
ProvenanceGraphPackNodeSchema,
|
|
11057
|
+
ProvenanceGraphEntryNodeSchema,
|
|
11058
|
+
_Object_({
|
|
11059
|
+
id: String$1(),
|
|
11060
|
+
kind: Literal("rendered_pack"),
|
|
11061
|
+
label: String$1(),
|
|
11062
|
+
cid: Union([String$1(), Null()]),
|
|
11063
|
+
meta: ProvenanceGraphRenderedPackMetaSchema
|
|
11064
|
+
})
|
|
11065
|
+
]);
|
|
11066
|
+
var ProvenanceGraphEdgeSchema = _Object_({
|
|
11067
|
+
id: String$1(),
|
|
11068
|
+
from: String$1(),
|
|
11069
|
+
to: String$1(),
|
|
11070
|
+
kind: ProvenanceGraphEdgeKindSchema,
|
|
11071
|
+
label: Optional(String$1()),
|
|
11072
|
+
meta: Optional(Record(String$1(), Union([
|
|
11073
|
+
String$1(),
|
|
11074
|
+
Number$1(),
|
|
11075
|
+
Boolean$1(),
|
|
11076
|
+
Null()
|
|
11077
|
+
])))
|
|
11078
|
+
});
|
|
11079
|
+
_Object_({
|
|
11080
|
+
metadata: _Object_({
|
|
11081
|
+
format: Literal("moltnet.provenance-graph/v1"),
|
|
11082
|
+
generatedAt: TimestampSchema,
|
|
11083
|
+
rootNodeId: String$1(),
|
|
11084
|
+
rootPackId: UuidSchema,
|
|
11085
|
+
depth: Number$1({ minimum: 0 })
|
|
11086
|
+
}),
|
|
11087
|
+
nodes: _Array_(ProvenanceGraphNodeSchema),
|
|
11088
|
+
edges: _Array_(ProvenanceGraphEdgeSchema)
|
|
11089
|
+
}, { $id: "ProvenanceGraph" });
|
|
11090
|
+
//#endregion
|
|
11091
|
+
//#region ../models/src/signer-constraint.ts
|
|
11092
|
+
var SIGNER_CONSTRAINT_TYPE = {
|
|
11093
|
+
Human: "human",
|
|
11094
|
+
TeamRole: "team-role",
|
|
11095
|
+
Group: "group"
|
|
11096
|
+
};
|
|
11097
|
+
Union([
|
|
11098
|
+
_Object_({
|
|
11099
|
+
type: Literal(SIGNER_CONSTRAINT_TYPE.Human),
|
|
11100
|
+
id: String$1({ format: "uuid" })
|
|
11101
|
+
}),
|
|
11102
|
+
_Object_({
|
|
11103
|
+
type: Literal(SIGNER_CONSTRAINT_TYPE.TeamRole),
|
|
11104
|
+
id: TeamRoleSchema
|
|
11105
|
+
}),
|
|
11106
|
+
_Object_({
|
|
11107
|
+
type: Literal(SIGNER_CONSTRAINT_TYPE.Group),
|
|
11108
|
+
id: String$1({ format: "uuid" })
|
|
11109
|
+
})
|
|
11110
|
+
]);
|
|
11111
|
+
//#endregion
|
|
11112
|
+
//#region ../models/src/signer-protocol.ts
|
|
11113
|
+
function schemaRef(schema) {
|
|
11114
|
+
return Ref$2(schemaId(schema));
|
|
11115
|
+
}
|
|
11116
|
+
function schemaId(schema) {
|
|
11117
|
+
const id = schema.$id;
|
|
11118
|
+
if (typeof id !== "string" || id.length === 0) throw new Error("Signer protocol schemas must have an identifier");
|
|
11119
|
+
return id;
|
|
11120
|
+
}
|
|
11121
|
+
var SignerBase64UrlSchema = PreviewSignBase64UrlSchema;
|
|
11122
|
+
var SignerUuidSchema = String$1({
|
|
11123
|
+
$id: "SignerUuid",
|
|
11124
|
+
pattern: "^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
|
|
11125
|
+
});
|
|
11126
|
+
var SignerOperationSchema = Union([
|
|
11127
|
+
Literal("credential-enrollment"),
|
|
11128
|
+
Literal("credential-registration"),
|
|
11129
|
+
Literal("signing-request")
|
|
11130
|
+
], { $id: "SignerOperation" });
|
|
11131
|
+
var SignerChallengeOperationSchema = PreviewSignChallengeOperationSchema;
|
|
11132
|
+
var SignerPreviewSignPublicMaterialSchema = PreviewSignPublicMaterialSchema;
|
|
11133
|
+
var SignerPreviewSignChallengeValueSchema = PreviewSignChallengeValueSchema;
|
|
11134
|
+
var SignerProblemSchema = _Object_({
|
|
11135
|
+
code: String$1({ minLength: 1 }),
|
|
11136
|
+
message: String$1({ minLength: 1 })
|
|
11137
|
+
}, {
|
|
11138
|
+
$id: "SignerProblem",
|
|
11139
|
+
additionalProperties: false
|
|
11140
|
+
});
|
|
11141
|
+
var SignerCeremonyParamsSchema = _Object_({ ceremonyId: Unsafe(schemaRef(SignerBase64UrlSchema)) }, {
|
|
11142
|
+
$id: "SignerCeremonyParams",
|
|
11143
|
+
additionalProperties: false
|
|
11144
|
+
});
|
|
11145
|
+
var SignerSessionSchema = _Object_({
|
|
11146
|
+
version: Literal(1),
|
|
11147
|
+
token: Unsafe(schemaRef(SignerBase64UrlSchema)),
|
|
11148
|
+
expiresAt: String$1()
|
|
11149
|
+
}, {
|
|
11150
|
+
$id: "SignerSession",
|
|
11151
|
+
additionalProperties: false
|
|
11152
|
+
});
|
|
11153
|
+
var SignerEnrollmentCeremonyRequestSchema = _Object_({
|
|
11154
|
+
version: Literal(1),
|
|
11155
|
+
operation: Literal("credential-enrollment"),
|
|
11156
|
+
label: String$1({
|
|
11157
|
+
minLength: 1,
|
|
11158
|
+
maxLength: 255
|
|
11159
|
+
}),
|
|
11160
|
+
teamId: Unsafe(schemaRef(SignerUuidSchema))
|
|
11161
|
+
}, {
|
|
11162
|
+
$id: "SignerEnrollmentCeremonyRequest",
|
|
11163
|
+
additionalProperties: false
|
|
11164
|
+
});
|
|
11165
|
+
var SignerChallengeCeremonyRequestSchema = _Object_({
|
|
11166
|
+
version: Literal(1),
|
|
11167
|
+
operation: Unsafe(schemaRef(SignerChallengeOperationSchema)),
|
|
11168
|
+
resourceId: Unsafe(schemaRef(SignerUuidSchema)),
|
|
11169
|
+
challenge: Unsafe(schemaRef(SignerPreviewSignChallengeValueSchema))
|
|
11170
|
+
}, {
|
|
11171
|
+
$id: "SignerChallengeCeremonyRequest",
|
|
11172
|
+
additionalProperties: false
|
|
11173
|
+
});
|
|
11174
|
+
var SignerCeremonyRequestSchema = Union([Unsafe(schemaRef(SignerEnrollmentCeremonyRequestSchema)), Unsafe(schemaRef(SignerChallengeCeremonyRequestSchema))], { $id: "SignerCeremonyRequest" });
|
|
11175
|
+
var SignerCeremonySchema = _Object_({
|
|
11176
|
+
version: Literal(1),
|
|
11177
|
+
id: Unsafe(schemaRef(SignerBase64UrlSchema)),
|
|
11178
|
+
operation: Unsafe(schemaRef(SignerOperationSchema)),
|
|
11179
|
+
approvalUrl: String$1(),
|
|
11180
|
+
expiresAt: String$1()
|
|
11181
|
+
}, {
|
|
11182
|
+
$id: "SignerCeremony",
|
|
11183
|
+
additionalProperties: false
|
|
11184
|
+
});
|
|
11185
|
+
var SignerPendingResultSchema = _Object_({
|
|
11186
|
+
version: Literal(1),
|
|
11187
|
+
status: Literal("pending"),
|
|
11188
|
+
operation: Unsafe(schemaRef(SignerOperationSchema))
|
|
11189
|
+
}, {
|
|
11190
|
+
$id: "SignerPendingResult",
|
|
11191
|
+
additionalProperties: false
|
|
11192
|
+
});
|
|
11193
|
+
var SignerEnrollmentResultSchema = _Object_({
|
|
11194
|
+
version: Literal(1),
|
|
11195
|
+
status: Literal("completed"),
|
|
11196
|
+
operation: Literal("credential-enrollment"),
|
|
11197
|
+
publicMaterial: Unsafe(schemaRef(SignerPreviewSignPublicMaterialSchema))
|
|
11198
|
+
}, {
|
|
11199
|
+
$id: "SignerEnrollmentResult",
|
|
11200
|
+
additionalProperties: false
|
|
11201
|
+
});
|
|
11202
|
+
var SignerReceiptSchema = PreviewSignReceiptValueSchema;
|
|
11203
|
+
var SignerSignatureResultSchema = _Object_({
|
|
11204
|
+
version: Literal(1),
|
|
11205
|
+
status: Literal("completed"),
|
|
11206
|
+
operation: Unsafe(schemaRef(SignerChallengeOperationSchema)),
|
|
11207
|
+
receipt: Unsafe(schemaRef(SignerReceiptSchema))
|
|
11208
|
+
}, {
|
|
11209
|
+
$id: "SignerSignatureResult",
|
|
11210
|
+
additionalProperties: false
|
|
11211
|
+
});
|
|
11212
|
+
var SignerFailedResultSchema = _Object_({
|
|
11213
|
+
version: Literal(1),
|
|
11214
|
+
status: Literal("failed"),
|
|
11215
|
+
operation: Unsafe(schemaRef(SignerOperationSchema)),
|
|
11216
|
+
code: String$1(),
|
|
11217
|
+
message: String$1()
|
|
11218
|
+
}, {
|
|
11219
|
+
$id: "SignerFailedResult",
|
|
11220
|
+
additionalProperties: false
|
|
11221
|
+
});
|
|
11222
|
+
var SignerCeremonyResultSchema = Union([
|
|
11223
|
+
Unsafe(schemaRef(SignerPendingResultSchema)),
|
|
11224
|
+
Unsafe(schemaRef(SignerEnrollmentResultSchema)),
|
|
11225
|
+
Unsafe(schemaRef(SignerSignatureResultSchema)),
|
|
11226
|
+
Unsafe(schemaRef(SignerFailedResultSchema))
|
|
11227
|
+
], { $id: "SignerCeremonyResult" });
|
|
11228
|
+
({ ...previewSignSchemaContext }), schemaId(SignerUuidSchema), schemaId(SignerOperationSchema), schemaId(SignerProblemSchema), schemaId(SignerCeremonyParamsSchema), schemaId(SignerSessionSchema), schemaId(SignerEnrollmentCeremonyRequestSchema), schemaId(SignerChallengeCeremonyRequestSchema), schemaId(SignerCeremonyRequestSchema), schemaId(SignerCeremonySchema), schemaId(SignerPendingResultSchema), schemaId(SignerEnrollmentResultSchema), schemaId(SignerSignatureResultSchema), schemaId(SignerFailedResultSchema), schemaId(SignerCeremonyResultSchema);
|
|
11229
|
+
//#endregion
|
|
11230
|
+
//#region ../models/src/tool-enforcement.ts
|
|
11231
|
+
var TOOL_ENFORCEMENT_VALUES = [
|
|
11232
|
+
"off",
|
|
11233
|
+
"watch",
|
|
11234
|
+
"enforce"
|
|
11235
|
+
];
|
|
11236
|
+
var ToolEnforcementSchema = Union([
|
|
11237
|
+
Literal(TOOL_ENFORCEMENT_VALUES[0]),
|
|
11238
|
+
Literal(TOOL_ENFORCEMENT_VALUES[1]),
|
|
11239
|
+
Literal(TOOL_ENFORCEMENT_VALUES[2])
|
|
11240
|
+
], { description: "Runtime tool-policy enforcement mode: off (inert), watch (audit only), enforce (block disallowed tools, fail-closed)." });
|
|
11241
|
+
//#endregion
|
|
11242
|
+
//#region ../tasks/src/runtime-profiles.ts
|
|
11243
|
+
var RuntimeProfileName = String$1({
|
|
11244
|
+
minLength: 1,
|
|
11245
|
+
maxLength: 100,
|
|
11246
|
+
pattern: "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,99}$"
|
|
11247
|
+
});
|
|
11248
|
+
var RuntimeProfileEnvName = String$1({
|
|
11249
|
+
minLength: 1,
|
|
11250
|
+
maxLength: 128,
|
|
11251
|
+
pattern: "^[A-Z_][A-Z0-9_]*$"
|
|
11252
|
+
});
|
|
11253
|
+
var RuntimeProfileToolName = String$1({
|
|
11254
|
+
minLength: 1,
|
|
11255
|
+
maxLength: 128,
|
|
11256
|
+
pattern: "^[a-zA-Z0-9._/-]+$"
|
|
11257
|
+
});
|
|
11258
|
+
var RUNTIME_PROFILE_RUNTIME_KIND_PATTERN = "^[a-z][a-z0-9._-]{0,99}$";
|
|
11259
|
+
new RegExp(RUNTIME_PROFILE_RUNTIME_KIND_PATTERN);
|
|
11260
|
+
var RuntimeProfileRuntimeKind = String$1({
|
|
11261
|
+
minLength: 1,
|
|
11262
|
+
maxLength: 100,
|
|
11263
|
+
pattern: RUNTIME_PROFILE_RUNTIME_KIND_PATTERN
|
|
11264
|
+
});
|
|
11265
|
+
var RuntimeProfileWorkspaceMode = Union([
|
|
11266
|
+
Literal("none"),
|
|
11267
|
+
Literal("shared_mount"),
|
|
11268
|
+
Literal("dedicated_worktree")
|
|
11269
|
+
]);
|
|
11270
|
+
/**
|
|
11271
|
+
* Tool-policy enforcement mode for the profile's runtime `tool_call` gate:
|
|
11272
|
+
* `off` (inert), `watch` (audit only), `enforce` (block disallowed tools,
|
|
11273
|
+
* fail-closed). Read by the daemon via `GET /runtime-profiles/:id/allowed-tools`.
|
|
11274
|
+
*/
|
|
11275
|
+
var RuntimeProfileToolEnforcement = ToolEnforcementSchema;
|
|
10055
11276
|
var RuntimeProfileAllowedWorkspaceModes = _Array_(RuntimeProfileWorkspaceMode, {
|
|
10056
11277
|
minItems: 1,
|
|
10057
11278
|
maxItems: 3,
|
|
@@ -10083,58 +11304,16 @@ var RuntimeProfileNullableMaxOutputTokens = Union([Integer({
|
|
|
10083
11304
|
minimum: 1,
|
|
10084
11305
|
maximum: 1e6
|
|
10085
11306
|
}), Null()]);
|
|
10086
|
-
var SandboxResumeCommandWhenSchema = _Object_({ workspaceMode: Optional(_Array_(Union([
|
|
10087
|
-
Literal("shared_mount"),
|
|
10088
|
-
Literal("dedicated_worktree"),
|
|
10089
|
-
Literal("scratch_mount")
|
|
10090
|
-
]), {
|
|
10091
|
-
minItems: 1,
|
|
10092
|
-
maxItems: 3
|
|
10093
|
-
})) }, { additionalProperties: false });
|
|
10094
|
-
var RuntimeProfileSandboxResumeCommand = Union([String$1({
|
|
10095
|
-
minLength: 1,
|
|
10096
|
-
maxLength: 4096
|
|
10097
|
-
}), _Object_({
|
|
10098
|
-
run: String$1({
|
|
10099
|
-
minLength: 1,
|
|
10100
|
-
maxLength: 4096
|
|
10101
|
-
}),
|
|
10102
|
-
when: Optional(SandboxResumeCommandWhenSchema),
|
|
10103
|
-
retries: Optional(Integer({
|
|
10104
|
-
minimum: 0,
|
|
10105
|
-
maximum: 5
|
|
10106
|
-
})),
|
|
10107
|
-
retryBackoffMs: Optional(Integer({
|
|
10108
|
-
minimum: 0,
|
|
10109
|
-
maximum: 6e4
|
|
10110
|
-
}))
|
|
10111
|
-
}, { additionalProperties: false })]);
|
|
10112
11307
|
var RuntimeProfileAllowedHost = String$1({
|
|
10113
11308
|
minLength: 1,
|
|
10114
11309
|
maxLength: 255,
|
|
10115
11310
|
pattern: "^(?:\\*\\.)?(?:[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?)(?:\\.(?:[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?))*$"
|
|
10116
11311
|
});
|
|
10117
11312
|
var RuntimeProfileSandbox = _Object_({
|
|
10118
|
-
snapshot: Optional(_Object_({
|
|
10119
|
-
setupCommands: Optional(_Array_(String$1({
|
|
10120
|
-
minLength: 1,
|
|
10121
|
-
maxLength: 4096
|
|
10122
|
-
}), { maxItems: 20 })),
|
|
10123
|
-
allowedHosts: Optional(_Array_(String$1({
|
|
10124
|
-
minLength: 1,
|
|
10125
|
-
maxLength: 255
|
|
10126
|
-
}), { maxItems: 50 })),
|
|
10127
|
-
overlaySize: Optional(String$1({
|
|
10128
|
-
minLength: 2,
|
|
10129
|
-
maxLength: 16,
|
|
10130
|
-
pattern: "^[0-9]+[KMGTP]?$"
|
|
10131
|
-
}))
|
|
10132
|
-
}, { additionalProperties: false })),
|
|
10133
11313
|
network: Optional(_Object_({
|
|
10134
11314
|
allowedHosts: Optional(_Array_(RuntimeProfileAllowedHost, { maxItems: 50 })),
|
|
10135
11315
|
allowedInternalHosts: Optional(_Array_(RuntimeProfileAllowedHost, { maxItems: 50 }))
|
|
10136
11316
|
}, { additionalProperties: false })),
|
|
10137
|
-
resumeCommands: Optional(_Array_(RuntimeProfileSandboxResumeCommand, { maxItems: 30 })),
|
|
10138
11317
|
vfs: Optional(_Object_({
|
|
10139
11318
|
shadow: Optional(_Array_(String$1({
|
|
10140
11319
|
minLength: 1,
|
|
@@ -10221,7 +11400,7 @@ _Object_({
|
|
|
10221
11400
|
topP: RuntimeProfileNullableTopP,
|
|
10222
11401
|
topK: RuntimeProfileNullableTopK,
|
|
10223
11402
|
maxOutputTokens: RuntimeProfileNullableMaxOutputTokens,
|
|
10224
|
-
runtimeKind:
|
|
11403
|
+
runtimeKind: RuntimeProfileRuntimeKind,
|
|
10225
11404
|
sandbox: RuntimeProfileSandbox,
|
|
10226
11405
|
sessionStorageMode: Literal("local"),
|
|
10227
11406
|
workspaceStorageMode: Literal("local"),
|
|
@@ -10240,8 +11419,10 @@ _Object_({
|
|
|
10240
11419
|
maxBatchSize: RuntimeProfileMaxBatchSize,
|
|
10241
11420
|
maxTurns: RuntimeProfileMaxTurns,
|
|
10242
11421
|
maxBashTimeouts: RuntimeProfileMaxBashTimeouts,
|
|
11422
|
+
toolEnforcement: RuntimeProfileToolEnforcement,
|
|
10243
11423
|
requiredEnv: _Array_(RuntimeProfileEnvName, { maxItems: 100 }),
|
|
10244
11424
|
requiredTools: _Array_(RuntimeProfileToolName, { maxItems: 100 }),
|
|
11425
|
+
requiredExecutables: _Array_(RuntimeProfileToolName, { maxItems: 100 }),
|
|
10245
11426
|
context: _Array_(RuntimeProfileContext, { maxItems: 5 }),
|
|
10246
11427
|
revision: Integer({ minimum: 1 }),
|
|
10247
11428
|
definitionCid: String$1({
|
|
@@ -11643,7 +12824,7 @@ var BUILT_IN_TASK_TYPES = {
|
|
|
11643
12824
|
outputKind: "artifact",
|
|
11644
12825
|
resumable: true,
|
|
11645
12826
|
workspaceMode: "shared_mount",
|
|
11646
|
-
workspaceScope: "
|
|
12827
|
+
workspaceScope: "attempt",
|
|
11647
12828
|
sessionScope: "correlation",
|
|
11648
12829
|
acceptsInputWorkspaceOverride: true,
|
|
11649
12830
|
requiresReferences: false,
|
|
@@ -14458,8 +15639,6 @@ var TaskMessageKind = Union([
|
|
|
14458
15639
|
var Uuid = String$1({ format: "uuid" });
|
|
14459
15640
|
var Cid = String$1({ minLength: 1 });
|
|
14460
15641
|
var IsoTimestamp = String$1({ format: "date-time" });
|
|
14461
|
-
var MAX_CLAIM_CONDITION_BRANCHES = 8;
|
|
14462
|
-
var MAX_CLAIM_CONDITION_STATUSES = 8;
|
|
14463
15642
|
/**
|
|
14464
15643
|
* Daemon-asserted runtime state stamped onto a `TaskAttemptSummary` at
|
|
14465
15644
|
* attempt-completion time. The server persists this block verbatim and
|
|
@@ -14485,14 +15664,14 @@ Unsafe(Cyclic({ ClaimCondition: Unsafe(Union([
|
|
|
14485
15664
|
op: Literal("all"),
|
|
14486
15665
|
conditions: _Array_(Ref$2("ClaimCondition"), {
|
|
14487
15666
|
minItems: 1,
|
|
14488
|
-
maxItems:
|
|
15667
|
+
maxItems: 8
|
|
14489
15668
|
})
|
|
14490
15669
|
}, { additionalProperties: false }),
|
|
14491
15670
|
_Object_({
|
|
14492
15671
|
op: Literal("any"),
|
|
14493
15672
|
conditions: _Array_(Ref$2("ClaimCondition"), {
|
|
14494
15673
|
minItems: 1,
|
|
14495
|
-
maxItems:
|
|
15674
|
+
maxItems: 8
|
|
14496
15675
|
})
|
|
14497
15676
|
}, { additionalProperties: false }),
|
|
14498
15677
|
_Object_({
|
|
@@ -14500,7 +15679,7 @@ Unsafe(Cyclic({ ClaimCondition: Unsafe(Union([
|
|
|
14500
15679
|
taskId: Uuid,
|
|
14501
15680
|
statuses: _Array_(Ref$2("TaskStatus"), {
|
|
14502
15681
|
minItems: 1,
|
|
14503
|
-
maxItems:
|
|
15682
|
+
maxItems: 8
|
|
14504
15683
|
})
|
|
14505
15684
|
}, { additionalProperties: false }),
|
|
14506
15685
|
_Object_({
|
|
@@ -15539,6 +16718,13 @@ function createTasksNamespace(context) {
|
|
|
15539
16718
|
auth
|
|
15540
16719
|
}));
|
|
15541
16720
|
},
|
|
16721
|
+
async registerExecutorManifest(body) {
|
|
16722
|
+
return unwrapResult(await registerExecutorManifest({
|
|
16723
|
+
client,
|
|
16724
|
+
auth,
|
|
16725
|
+
body
|
|
16726
|
+
}));
|
|
16727
|
+
},
|
|
15542
16728
|
artifacts: {
|
|
15543
16729
|
async stage(body, query, options) {
|
|
15544
16730
|
return {
|
|
@@ -15962,6 +17148,7 @@ function createAgent(options) {
|
|
|
15962
17148
|
problems: createProblemsNamespace(context),
|
|
15963
17149
|
teams: createTeamsNamespace(context),
|
|
15964
17150
|
runtimeProfiles: createRuntimeProfilesNamespace(context),
|
|
17151
|
+
runtimePolicies: createRuntimePoliciesNamespace(context),
|
|
15965
17152
|
tasks: createTasksNamespace(context),
|
|
15966
17153
|
runtimeSlots: createRuntimeSlotsNamespace(context),
|
|
15967
17154
|
runtimeSessions: createRuntimeSessionsNamespace(context),
|