primitive-admin 1.2.0-alpha.7 → 1.2.0-alpha.9
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/README.md +8 -2
- package/assets/skill/skills/primitive-platform/SKILL.md +22 -8
- package/dist/src/commands/apps-children.d.ts +1 -1
- package/dist/src/commands/apps-children.js +55 -145
- package/dist/src/commands/apps-children.js.map +1 -1
- package/dist/src/commands/auth.js +107 -33
- package/dist/src/commands/auth.js.map +1 -1
- package/dist/src/commands/database-types.js +13 -313
- package/dist/src/commands/database-types.js.map +1 -1
- package/dist/src/commands/databases.js +13 -1
- package/dist/src/commands/databases.js.map +1 -1
- package/dist/src/commands/documents.js +70 -11
- package/dist/src/commands/documents.js.map +1 -1
- package/dist/src/commands/llm.js +9 -6
- package/dist/src/commands/llm.js.map +1 -1
- package/dist/src/commands/settings.d.ts +12 -9
- package/dist/src/commands/settings.js +31 -79
- package/dist/src/commands/settings.js.map +1 -1
- package/dist/src/commands/sync-app-settings.d.ts +12 -2
- package/dist/src/commands/sync-app-settings.js +35 -10
- package/dist/src/commands/sync-app-settings.js.map +1 -1
- package/dist/src/commands/sync.d.ts +1 -8
- package/dist/src/commands/sync.js +47 -45
- package/dist/src/commands/sync.js.map +1 -1
- package/dist/src/lib/api-client.d.ts +46 -6
- package/dist/src/lib/api-client.js +156 -64
- package/dist/src/lib/api-client.js.map +1 -1
- package/dist/src/lib/app-settings-descriptor.d.ts +38 -0
- package/dist/src/lib/app-settings-descriptor.js +96 -4
- package/dist/src/lib/app-settings-descriptor.js.map +1 -1
- package/dist/src/lib/child-apps-local.d.ts +0 -46
- package/dist/src/lib/child-apps-local.js +2 -72
- package/dist/src/lib/child-apps-local.js.map +1 -1
- package/dist/src/lib/credentials-home.d.ts +51 -0
- package/dist/src/lib/credentials-home.js +169 -0
- package/dist/src/lib/credentials-home.js.map +1 -0
- package/dist/src/lib/credentials-lock.d.ts +80 -0
- package/dist/src/lib/credentials-lock.js +222 -0
- package/dist/src/lib/credentials-lock.js.map +1 -0
- package/dist/src/lib/credentials-store.d.ts +56 -4
- package/dist/src/lib/credentials-store.js +236 -78
- package/dist/src/lib/credentials-store.js.map +1 -1
- package/dist/src/lib/env-resolver-core.d.ts +1 -1
- package/dist/src/lib/env-resolver-core.js.map +1 -1
- package/dist/src/lib/function-bundle.d.ts +38 -18
- package/dist/src/lib/function-bundle.js +60 -35
- package/dist/src/lib/function-bundle.js.map +1 -1
- package/dist/src/lib/function-document-types.d.ts +5 -3
- package/dist/src/lib/function-document-types.js +10 -14
- package/dist/src/lib/function-document-types.js.map +1 -1
- package/dist/src/lib/function-source-roots.d.ts +67 -0
- package/dist/src/lib/function-source-roots.js +148 -0
- package/dist/src/lib/function-source-roots.js.map +1 -0
- package/dist/src/lib/function-sync.d.ts +27 -0
- package/dist/src/lib/function-sync.js +16 -3
- package/dist/src/lib/function-sync.js.map +1 -1
- package/dist/src/lib/function-triggers.d.ts +15 -3
- package/dist/src/lib/function-triggers.js +72 -10
- package/dist/src/lib/function-triggers.js.map +1 -1
- package/dist/src/lib/function-typecheck.d.ts +37 -2
- package/dist/src/lib/function-typecheck.js +210 -28
- package/dist/src/lib/function-typecheck.js.map +1 -1
- package/dist/src/lib/generated-config-surfaces.d.ts +48 -11
- package/dist/src/lib/generated-config-surfaces.js +178 -49
- package/dist/src/lib/generated-config-surfaces.js.map +1 -1
- package/dist/src/lib/generated-sdk-types.d.ts +1 -1
- package/dist/src/lib/generated-sdk-types.js +1 -1
- package/dist/src/lib/generated-sdk-types.js.map +1 -1
- package/dist/src/lib/generated-workflow-model-fields.d.ts +20 -0
- package/dist/src/lib/generated-workflow-model-fields.js +53 -0
- package/dist/src/lib/generated-workflow-model-fields.js.map +1 -0
- package/dist/src/lib/login-scope-lines.d.ts +1 -1
- package/dist/src/lib/login-scope-lines.js +1 -1
- package/dist/src/lib/login-scope-lines.js.map +1 -1
- package/dist/src/lib/project-config.d.ts +7 -0
- package/dist/src/lib/project-config.js +22 -1
- package/dist/src/lib/project-config.js.map +1 -1
- package/dist/src/lib/prompt-schema-codegen.d.ts +10 -3
- package/dist/src/lib/prompt-schema-codegen.js +52 -14
- package/dist/src/lib/prompt-schema-codegen.js.map +1 -1
- package/dist/src/lib/root-import-decision.d.ts +9 -4
- package/dist/src/lib/root-import-decision.js +24 -3
- package/dist/src/lib/root-import-decision.js.map +1 -1
- package/dist/src/lib/scope-request.d.ts +8 -5
- package/dist/src/lib/scope-request.js +17 -8
- package/dist/src/lib/scope-request.js.map +1 -1
- package/dist/src/lib/swift-codegen/agentGenerator.d.ts +6 -2
- package/dist/src/lib/swift-codegen/agentGenerator.js +56 -4
- package/dist/src/lib/swift-codegen/agentGenerator.js.map +1 -1
- package/dist/src/lib/workflow-field-descriptor.d.ts +91 -0
- package/dist/src/lib/workflow-field-descriptor.js +153 -0
- package/dist/src/lib/workflow-field-descriptor.js.map +1 -0
- package/package.json +2 -2
|
@@ -5875,6 +5875,9 @@ export const AGENT_ERROR_CODES = [
|
|
|
5875
5875
|
// #4262 — a single-round test case whose seeded history, context or
|
|
5876
5876
|
// assertions cannot be a round of this agent (`agent-test-case.ts`).
|
|
5877
5877
|
"AGENT_TEST_CASE_INVALID",
|
|
5878
|
+
// #4549 — a presentation call whose `references` name a number that is not
|
|
5879
|
+
// an earlier call of the turn with a result.
|
|
5880
|
+
"AGENT_PRESENTATION_REFERENCE_INVALID",
|
|
5878
5881
|
];
|
|
5879
5882
|
/**
|
|
5880
5883
|
* The platform maximums. An agent may lower `maxSteps`, `waitLimitSeconds`
|
|
@@ -5900,14 +5903,20 @@ export const AGENT_ANSWERED_BY = ["initiator", "participants"];
|
|
|
5900
5903
|
export const AGENT_TOOL_INVOKE = ["request", "task"];
|
|
5901
5904
|
export const AGENT_TOOL_HISTORY_SCOPES = ["session", "turn"];
|
|
5902
5905
|
/**
|
|
5903
|
-
*
|
|
5904
|
-
* `
|
|
5905
|
-
*
|
|
5906
|
+
* Where a tool without a `function` runs: `client` is answered by a member's
|
|
5907
|
+
* client; `presentation` is data the model hands the client with its final
|
|
5908
|
+
* answer, which no client executes (#4549).
|
|
5909
|
+
*/
|
|
5910
|
+
export const AGENT_TOOL_RUNS = ["client", "presentation"];
|
|
5911
|
+
/**
|
|
5912
|
+
* The result the platform records for a presentation call: the call is final
|
|
5913
|
+
* when its response is committed, and later rounds read this as its tool
|
|
5914
|
+
* result.
|
|
5906
5915
|
*/
|
|
5907
5916
|
export const AGENT_TERMINAL_CALL_OUTPUT = Object.freeze({
|
|
5908
5917
|
delivered: true,
|
|
5909
5918
|
});
|
|
5910
|
-
/** The schema of `AGENT_TERMINAL_CALL_OUTPUT
|
|
5919
|
+
/** The schema of `AGENT_TERMINAL_CALL_OUTPUT`, the result a presentation call is recorded with. */
|
|
5911
5920
|
export const AGENT_TERMINAL_CALL_OUTPUT_SCHEMA = Object.freeze({
|
|
5912
5921
|
type: "object",
|
|
5913
5922
|
properties: { delivered: { type: "boolean" } },
|
|
@@ -5935,6 +5944,7 @@ const AGENT_TOOL_KEYS = [
|
|
|
5935
5944
|
"statusText",
|
|
5936
5945
|
"historyScope",
|
|
5937
5946
|
"endsTurn",
|
|
5947
|
+
"references",
|
|
5938
5948
|
"inputSchema",
|
|
5939
5949
|
"outputSchema",
|
|
5940
5950
|
];
|
|
@@ -6030,6 +6040,71 @@ function checkAgentName(value, path, seen, what, out) {
|
|
|
6030
6040
|
}
|
|
6031
6041
|
seen.add(value);
|
|
6032
6042
|
}
|
|
6043
|
+
/** Whether a property schema holds one integer, or a list of integers. */
|
|
6044
|
+
function agentIsReferenceProperty(schema) {
|
|
6045
|
+
if (!agentIsPlainObject(schema))
|
|
6046
|
+
return false;
|
|
6047
|
+
if (schema.type === "integer")
|
|
6048
|
+
return true;
|
|
6049
|
+
return (schema.type === "array" &&
|
|
6050
|
+
agentIsPlainObject(schema.items) &&
|
|
6051
|
+
schema.items.type === "integer");
|
|
6052
|
+
}
|
|
6053
|
+
/**
|
|
6054
|
+
* A presentation (#4549): its `inputSchema` is required, the keys of a call
|
|
6055
|
+
* that runs or pauses are refused, and each `references` entry names a
|
|
6056
|
+
* top-level input property declared as an integer or a list of integers.
|
|
6057
|
+
*/
|
|
6058
|
+
function checkAgentPresentation(tool, path, out) {
|
|
6059
|
+
const notDeclared = [
|
|
6060
|
+
["outputSchema", "the platform records a presentation call's result"],
|
|
6061
|
+
["approval", "a presentation call never pauses"],
|
|
6062
|
+
["endsTurn", "a presentation call always ends the turn"],
|
|
6063
|
+
];
|
|
6064
|
+
for (const [key, why] of notDeclared) {
|
|
6065
|
+
if (tool[key] !== undefined) {
|
|
6066
|
+
out.push(agentInvalid(`${path}.${key}`, `is not declared on a presentation: ${why} — remove it`));
|
|
6067
|
+
}
|
|
6068
|
+
}
|
|
6069
|
+
const schemaPath = `${path}.inputSchema`;
|
|
6070
|
+
if (tool.inputSchema === undefined) {
|
|
6071
|
+
out.push(agentInvalid(schemaPath, "is required on a presentation"));
|
|
6072
|
+
}
|
|
6073
|
+
else {
|
|
6074
|
+
const error = agentSchemaError(tool.inputSchema, schemaPath);
|
|
6075
|
+
if (error)
|
|
6076
|
+
out.push(error);
|
|
6077
|
+
}
|
|
6078
|
+
if (tool.references === undefined)
|
|
6079
|
+
return;
|
|
6080
|
+
const referencesPath = `${path}.references`;
|
|
6081
|
+
const references = tool.references;
|
|
6082
|
+
if (!Array.isArray(references) ||
|
|
6083
|
+
references.length === 0 ||
|
|
6084
|
+
!references.every((name) => agentIsNonEmptyString(name))) {
|
|
6085
|
+
out.push(agentInvalid(referencesPath, "must be a non-empty list of input property names, each holding an " +
|
|
6086
|
+
"integer or a list of integers"));
|
|
6087
|
+
return;
|
|
6088
|
+
}
|
|
6089
|
+
const seen = new Set();
|
|
6090
|
+
const properties = agentIsPlainObject(tool.inputSchema) && agentIsPlainObject(tool.inputSchema.properties)
|
|
6091
|
+
? tool.inputSchema.properties
|
|
6092
|
+
: {};
|
|
6093
|
+
for (const name of references) {
|
|
6094
|
+
if (seen.has(name)) {
|
|
6095
|
+
out.push(agentInvalid(referencesPath, `repeats "${name}"; each property is named once`));
|
|
6096
|
+
continue;
|
|
6097
|
+
}
|
|
6098
|
+
seen.add(name);
|
|
6099
|
+
if (!Object.prototype.hasOwnProperty.call(properties, name)) {
|
|
6100
|
+
out.push(agentInvalid(referencesPath, `names "${name}", which inputSchema.properties does not declare`));
|
|
6101
|
+
}
|
|
6102
|
+
else if (!agentIsReferenceProperty(properties[name])) {
|
|
6103
|
+
out.push(agentInvalid(referencesPath, `names "${name}", which must be declared as { type = "integer" } or ` +
|
|
6104
|
+
'a list of them ({ type = "array", items = { type = "integer" } })'));
|
|
6105
|
+
}
|
|
6106
|
+
}
|
|
6107
|
+
}
|
|
6033
6108
|
function checkAgentTool(tool, index, names, out) {
|
|
6034
6109
|
const path = `tools[${index}]`;
|
|
6035
6110
|
if (!agentIsPlainObject(tool)) {
|
|
@@ -6045,52 +6120,61 @@ function checkAgentTool(tool, index, names, out) {
|
|
|
6045
6120
|
const hasRuns = tool.runs !== undefined;
|
|
6046
6121
|
if (hasFunction === hasRuns) {
|
|
6047
6122
|
out.push(agentInvalid(path, hasFunction
|
|
6048
|
-
? 'sets both function and runs; a tool is a server tool (function = "<key>")
|
|
6049
|
-
: 'needs function = "<key>" (a server tool)
|
|
6123
|
+
? 'sets both function and runs; a tool is a server tool (function = "<key>"), a client tool (runs = "client") or a presentation (runs = "presentation"), not more than one'
|
|
6124
|
+
: 'needs function = "<key>" (a server tool), runs = "client" (a client tool) or runs = "presentation" (a presentation)'));
|
|
6050
6125
|
}
|
|
6051
|
-
if (hasRuns && tool.runs
|
|
6052
|
-
out.push(agentInvalid(`${path}.runs`, `must be "
|
|
6126
|
+
if (hasRuns && !AGENT_TOOL_RUNS.includes(tool.runs)) {
|
|
6127
|
+
out.push(agentInvalid(`${path}.runs`, `must be ${AGENT_TOOL_RUNS.map((runs) => JSON.stringify(runs)).join(" or ")}; found ${JSON.stringify(tool.runs)}`));
|
|
6053
6128
|
}
|
|
6054
6129
|
if (hasFunction && !agentIsNonEmptyString(tool.function)) {
|
|
6055
6130
|
out.push(agentInvalid(`${path}.function`, "must name a server function by key"));
|
|
6056
6131
|
}
|
|
6057
|
-
const isClient = hasRuns && !hasFunction;
|
|
6132
|
+
const isClient = hasRuns && !hasFunction && tool.runs === "client";
|
|
6133
|
+
const isPresentation = hasRuns && !hasFunction && tool.runs === "presentation";
|
|
6058
6134
|
if (tool.invoke !== undefined) {
|
|
6059
|
-
if (isClient) {
|
|
6060
|
-
out.push(agentInvalid(`${path}.invoke`,
|
|
6135
|
+
if (isClient || isPresentation) {
|
|
6136
|
+
out.push(agentInvalid(`${path}.invoke`, isClient
|
|
6137
|
+
? "is for server tools; a client tool is answered by a member's client"
|
|
6138
|
+
: "is for server tools; a presentation is never executed"));
|
|
6061
6139
|
}
|
|
6062
6140
|
else if (!AGENT_TOOL_INVOKE.includes(tool.invoke)) {
|
|
6063
6141
|
out.push(agentInvalid(`${path}.invoke`, `must be one of ${AGENT_TOOL_INVOKE.join(" | ")}`));
|
|
6064
6142
|
}
|
|
6065
6143
|
}
|
|
6066
|
-
|
|
6067
|
-
|
|
6068
|
-
out.push(agentInvalid(`${path}.endsTurn`, "must be true or false"));
|
|
6069
|
-
}
|
|
6070
|
-
if (terminal && tool.approval === true) {
|
|
6071
|
-
out.push(agentInvalid(`${path}.endsTurn`, "cannot be set with approval = true: a terminal call never pauses"));
|
|
6144
|
+
if (isPresentation) {
|
|
6145
|
+
checkAgentPresentation(tool, path, out);
|
|
6072
6146
|
}
|
|
6073
|
-
|
|
6074
|
-
const
|
|
6075
|
-
if (
|
|
6076
|
-
|
|
6077
|
-
|
|
6078
|
-
|
|
6147
|
+
else {
|
|
6148
|
+
const terminal = tool.endsTurn === true;
|
|
6149
|
+
if (tool.endsTurn !== undefined && typeof tool.endsTurn !== "boolean") {
|
|
6150
|
+
out.push(agentInvalid(`${path}.endsTurn`, "must be true or false"));
|
|
6151
|
+
}
|
|
6152
|
+
else if (isClient && terminal) {
|
|
6153
|
+
out.push(agentInvalid(`${path}.endsTurn`, "cannot be set on a client tool: a client tool is answered by a " +
|
|
6154
|
+
"member's client; for data the model hands the client with its " +
|
|
6155
|
+
'answer, declare runs = "presentation"'));
|
|
6156
|
+
}
|
|
6157
|
+
else if (terminal && tool.approval === true) {
|
|
6158
|
+
out.push(agentInvalid(`${path}.endsTurn`, "cannot be set with approval = true: a terminal call never pauses"));
|
|
6159
|
+
}
|
|
6160
|
+
if (tool.references !== undefined) {
|
|
6161
|
+
out.push(agentInvalid(`${path}.references`, 'is declared only on a presentation (runs = "presentation")'));
|
|
6162
|
+
}
|
|
6163
|
+
for (const key of ["inputSchema", "outputSchema"]) {
|
|
6164
|
+
const schemaPath = `${path}.${key}`;
|
|
6165
|
+
if (isClient) {
|
|
6166
|
+
if (tool[key] === undefined) {
|
|
6167
|
+
out.push(agentInvalid(schemaPath, "is required on a client tool"));
|
|
6168
|
+
continue;
|
|
6169
|
+
}
|
|
6170
|
+
const error = agentSchemaError(tool[key], schemaPath);
|
|
6171
|
+
if (error)
|
|
6172
|
+
out.push(error);
|
|
6079
6173
|
}
|
|
6080
|
-
|
|
6081
|
-
|
|
6082
|
-
|
|
6083
|
-
if (tool[key] === undefined) {
|
|
6084
|
-
out.push(agentInvalid(schemaPath, "is required on a client tool"));
|
|
6085
|
-
continue;
|
|
6174
|
+
else if (hasFunction && tool[key] !== undefined) {
|
|
6175
|
+
out.push(agentInvalid(schemaPath, "is not declared on a server tool; its function's schemas are the " +
|
|
6176
|
+
"tool's (one source of truth) — remove it"));
|
|
6086
6177
|
}
|
|
6087
|
-
const error = agentSchemaError(tool[key], schemaPath);
|
|
6088
|
-
if (error)
|
|
6089
|
-
out.push(error);
|
|
6090
|
-
}
|
|
6091
|
-
else if (hasFunction && tool[key] !== undefined) {
|
|
6092
|
-
out.push(agentInvalid(schemaPath, "is not declared on a server tool; its function's schemas are the " +
|
|
6093
|
-
"tool's (one source of truth) — remove it"));
|
|
6094
6178
|
}
|
|
6095
6179
|
}
|
|
6096
6180
|
if (tool.approval !== undefined && typeof tool.approval !== "boolean") {
|
|
@@ -6409,6 +6493,39 @@ export function agentTestCaseRefusal(promptKey, _role = "evaluator") {
|
|
|
6409
6493
|
return agentRefusal("AGENT_TEST_CASE_NOT_SUPPORTED", `Prompt "${promptKey}" is an agent (kind = "agent") and cannot be an ` +
|
|
6410
6494
|
"evaluator: an evaluator is run single-shot. Name a chat prompt");
|
|
6411
6495
|
}
|
|
6496
|
+
/** The integers a call's argument holds under one referencing property. */
|
|
6497
|
+
function referencedNumbers(value) {
|
|
6498
|
+
const values = Array.isArray(value) ? value : [value];
|
|
6499
|
+
return values.filter((v) => typeof v === "number" && Number.isInteger(v));
|
|
6500
|
+
}
|
|
6501
|
+
/**
|
|
6502
|
+
* The refusal of a presentation call whose `references` name a number that
|
|
6503
|
+
* is not an earlier call of the turn with a result — a refused call, a number
|
|
6504
|
+
* the turn never gave, or a call of the same response — or `null`. `earlier`
|
|
6505
|
+
* is the turn's calls committed before this call's response. The message
|
|
6506
|
+
* lists the offending values by property and the numbers that may be
|
|
6507
|
+
* referenced, with their tools, so the model can correct itself next round.
|
|
6508
|
+
*/
|
|
6509
|
+
export function presentationReferenceRefusal(tool, args, earlier) {
|
|
6510
|
+
if (!tool.references?.length || !agentIsPlainObject(args))
|
|
6511
|
+
return null;
|
|
6512
|
+
const valid = earlier.filter((call) => call.state === "output-available");
|
|
6513
|
+
const validNumbers = new Set(valid.map((call) => call.callNumber));
|
|
6514
|
+
const offending = [];
|
|
6515
|
+
for (const property of tool.references) {
|
|
6516
|
+
const bad = [...new Set(referencedNumbers(args[property]).filter((n) => !validNumbers.has(n)))];
|
|
6517
|
+
if (bad.length > 0)
|
|
6518
|
+
offending.push(`${property}: ${bad.join(", ")}`);
|
|
6519
|
+
}
|
|
6520
|
+
if (offending.length === 0)
|
|
6521
|
+
return null;
|
|
6522
|
+
const choices = valid.length > 0
|
|
6523
|
+
? `Reference one of: ${valid.map((call) => `${call.callNumber} (${call.toolName})`).join(", ")}`
|
|
6524
|
+
: "No earlier call of this turn has a result to reference";
|
|
6525
|
+
return agentRefusal("AGENT_PRESENTATION_REFERENCE_INVALID", `The call to "${tool.name}" references calls this turn has no result for ` +
|
|
6526
|
+
`(${offending.join("; ")}). A reference is the \`call\` number of an ` +
|
|
6527
|
+
`earlier tool result of this turn. ${choices}`);
|
|
6528
|
+
}
|
|
6412
6529
|
/** A deep copy, so a reader's defaults never reach the caller's value. */
|
|
6413
6530
|
function agentCopy(value) {
|
|
6414
6531
|
return value === undefined ? value : JSON.parse(JSON.stringify(value));
|
|
@@ -6416,7 +6533,8 @@ function agentCopy(value) {
|
|
|
6416
6533
|
/**
|
|
6417
6534
|
* The declaration with every default applied: `answeredBy = "initiator"`, the
|
|
6418
6535
|
* platform maximums for the limits, and per tool `invoke = "request"` (server
|
|
6419
|
-
* tools), `approval = false`, `historyScope = "session"` and `endsTurn = false
|
|
6536
|
+
* tools), `approval = false`, `historyScope = "session"` and `endsTurn = false`
|
|
6537
|
+
* — `endsTurn = true` for a presentation, whose call always ends the turn.
|
|
6420
6538
|
*
|
|
6421
6539
|
* The ONLY accessor for defaults — the stored value never carries them
|
|
6422
6540
|
* (DSO-3798-001). Takes a value `resolveAgentDeclaration` accepted (or `null`)
|
|
@@ -6433,10 +6551,10 @@ export function normalizeAgentDeclaration(declaration) {
|
|
|
6433
6551
|
history: source.history ?? null,
|
|
6434
6552
|
tools: (source.tools ?? []).map((tool) => ({
|
|
6435
6553
|
...tool,
|
|
6436
|
-
...(tool.runs ===
|
|
6554
|
+
...(tool.runs === undefined ? { invoke: tool.invoke ?? "request" } : {}),
|
|
6437
6555
|
approval: tool.approval ?? false,
|
|
6438
6556
|
historyScope: tool.historyScope ?? "session",
|
|
6439
|
-
endsTurn: tool.endsTurn ?? false,
|
|
6557
|
+
endsTurn: tool.runs === "presentation" ? true : (tool.endsTurn ?? false),
|
|
6440
6558
|
})),
|
|
6441
6559
|
events: source.events ?? [],
|
|
6442
6560
|
};
|
|
@@ -10564,8 +10682,10 @@ export const TEST_CASE_SURFACE = {
|
|
|
10564
10682
|
* explicit classification the secret-adjacent rule requires — the guard fails
|
|
10565
10683
|
* on a bare omission, not on a stated reference-only contract.
|
|
10566
10684
|
*
|
|
10567
|
-
* As of #2891 nothing here is writable-but-unauthorable
|
|
10568
|
-
*
|
|
10685
|
+
* As of #2891 nothing here is writable-but-unauthorable but one key: the
|
|
10686
|
+
* `protected` boolean (#3886) the protection level replaced in #4564 is a
|
|
10687
|
+
* `deprecated` entry, still accepted on write and never emitted, until its
|
|
10688
|
+
* scheduled retirement. There is no withheld-on-read field: the five superseded keys
|
|
10569
10689
|
* (`googleClientId`, `googleClientSecret`, `redirectUris`, `passkeyRpId`,
|
|
10570
10690
|
* `passkeyRpName`) stay DECLARED in `models.yaml` so a row's storage can still
|
|
10571
10691
|
* be read, but no write path accepts them and no serializer emits them, which
|
|
@@ -10668,21 +10788,29 @@ export const APP_SETTINGS_SURFACE = {
|
|
|
10668
10788
|
validation: handledBy(SETTINGS_HANDLER, "SettingsController", "apply"),
|
|
10669
10789
|
},
|
|
10670
10790
|
{
|
|
10671
|
-
field: "
|
|
10672
|
-
tomlKey: "
|
|
10673
|
-
type: "
|
|
10674
|
-
// Always: a pulled file states
|
|
10675
|
-
//
|
|
10791
|
+
field: "protection",
|
|
10792
|
+
tomlKey: "protection",
|
|
10793
|
+
type: "string",
|
|
10794
|
+
// Always: a pulled file states the app's protection level, rather
|
|
10795
|
+
// than leaving it to the absence of a key (#4564).
|
|
10676
10796
|
emit: "always",
|
|
10677
10797
|
writableOn: UPDATE_ONLY,
|
|
10678
|
-
//
|
|
10679
|
-
// may CHANGE it; a body carrying the
|
|
10680
|
-
// anyone the route admits
|
|
10798
|
+
// One of `default`, `protected` and `internal`, and only the app's
|
|
10799
|
+
// console owner or a super-admin may CHANGE it; a body carrying the
|
|
10800
|
+
// stored level is a no-op for anyone the route admits, and a child's
|
|
10801
|
+
// level is fixed at `internal` (`resolveProtectionWrite`,
|
|
10681
10802
|
// `src/services/protected-app.ts`).
|
|
10682
10803
|
validation: handledBy(SETTINGS_HANDLER, "SettingsController", "apply"),
|
|
10683
10804
|
},
|
|
10684
10805
|
],
|
|
10685
10806
|
notExposed: {
|
|
10807
|
+
protected: {
|
|
10808
|
+
kind: "deprecated",
|
|
10809
|
+
note: "The boolean the protection level replaced (#3886, #4564). Still " +
|
|
10810
|
+
"accepted on write, where `true` reads as `protection = \"protected\"` " +
|
|
10811
|
+
"and `false` as not protected, and kept in step with every level " +
|
|
10812
|
+
"write; never emitted. Use `[app].protection`.",
|
|
10813
|
+
},
|
|
10686
10814
|
appId: {
|
|
10687
10815
|
kind: "server-owned",
|
|
10688
10816
|
note: "The app's id; taken from the route, never authored.",
|
|
@@ -11173,6 +11301,7 @@ export const GENERATED_CONFIG_MODEL_FIELDS = {
|
|
|
11173
11301
|
"memberInvitationLimit",
|
|
11174
11302
|
"largeDocumentWindowDays",
|
|
11175
11303
|
"rootDocumentFormat",
|
|
11304
|
+
"protection",
|
|
11176
11305
|
"protected",
|
|
11177
11306
|
"parentAppId",
|
|
11178
11307
|
"childSlug",
|