@promptbook/cli 0.114.0-29 → 0.114.0-30
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/apps/agents-server/src/app/admin/about/page.tsx +1 -1
- package/apps/agents-server/src/app/page.tsx +1 -1
- package/apps/agents-server/src/constants/federatedAgentImport.ts +7 -0
- package/apps/agents-server/src/middleware/createMiddlewareRequestContext/loadRegisteredServers.ts +8 -0
- package/apps/agents-server/src/tools/$provideServer.ts +2 -1
- package/apps/agents-server/src/tools/mapRegisteredServerContexts.ts +1 -1
- package/apps/agents-server/src/utils/agentProjects/listAllAgentProjectSummaries.ts +2 -1
- package/apps/agents-server/src/utils/createWellKnownAgentUrl.ts +17 -0
- package/apps/agents-server/src/utils/currentServerRegistryContext.ts +2 -1
- package/apps/agents-server/src/utils/customDomainRouting.ts +143 -10
- package/apps/agents-server/src/utils/getFederatedServers.ts +5 -15
- package/apps/agents-server/src/utils/getWellKnownAgentUrl.ts +2 -3
- package/apps/agents-server/src/utils/parseFederatedServers.ts +14 -0
- package/apps/agents-server/src/utils/serverManagement/getManagedServerById.ts +1 -1
- package/apps/agents-server/src/utils/serverManagement/listManagedServers.ts +1 -1
- package/apps/agents-server/src/utils/serverRegistry.ts +0 -24
- package/apps/agents-server/src/utils/serverRegistryNode.ts +27 -0
- package/esm/apps/agents-server/src/constants/federatedAgentImport.d.ts +6 -0
- package/esm/index.es.js +35 -10
- package/esm/index.es.js.map +1 -1
- package/esm/scripts/run-codex-prompts/runners/openai-codex/buildCodexUsageFromOutput.d.ts +4 -1
- package/esm/src/version.d.ts +1 -1
- package/package.json +2 -2
- package/src/cli/cli-commands/common/promptRunnerCliOptions.ts +2 -0
- package/src/other/templates/getTemplatesPipelineCollection.ts +750 -853
- package/src/version.ts +2 -2
- package/src/versions.txt +1 -0
- package/umd/apps/agents-server/src/constants/federatedAgentImport.d.ts +6 -0
- package/umd/index.umd.js +35 -10
- package/umd/index.umd.js.map +1 -1
- package/umd/scripts/run-codex-prompts/runners/openai-codex/buildCodexUsageFromOutput.d.ts +4 -1
- package/umd/src/version.d.ts +1 -1
- package/esm/apps/agents-server/src/database/sqlite/$provideAgentsServerSqliteDatabase.d.ts +0 -69
- package/esm/apps/agents-server/src/database/sqlite/localSqliteSupabase/ensureTable.d.ts +0 -7
- package/esm/apps/agents-server/src/database/sqlite/localSqliteSupabase/localSqliteSql.d.ts +0 -30
- package/esm/apps/agents-server/src/database/sqlite/localSqliteSupabase/localSqliteTableSchema.d.ts +0 -76
- package/esm/apps/agents-server/src/database/sqlite/resolveAgentsServerSqliteDatabasePath.d.ts +0 -4
- package/esm/apps/agents-server/src/database/sqlite/resolveServerSqliteDatabasePath.d.ts +0 -28
- package/esm/apps/agents-server/src/database/sqlite/standaloneServerRegistryStore.d.ts +0 -110
- package/umd/apps/agents-server/src/database/sqlite/$provideAgentsServerSqliteDatabase.d.ts +0 -69
- package/umd/apps/agents-server/src/database/sqlite/localSqliteSupabase/ensureTable.d.ts +0 -7
- package/umd/apps/agents-server/src/database/sqlite/localSqliteSupabase/localSqliteSql.d.ts +0 -30
- package/umd/apps/agents-server/src/database/sqlite/localSqliteSupabase/localSqliteTableSchema.d.ts +0 -76
- package/umd/apps/agents-server/src/database/sqlite/resolveAgentsServerSqliteDatabasePath.d.ts +0 -4
- package/umd/apps/agents-server/src/database/sqlite/resolveServerSqliteDatabasePath.d.ts +0 -28
- package/umd/apps/agents-server/src/database/sqlite/standaloneServerRegistryStore.d.ts +0 -110
package/src/version.ts
CHANGED
|
@@ -16,11 +16,11 @@ export const BOOK_LANGUAGE_VERSION: string_semantic_version = '2.0.0';
|
|
|
16
16
|
* @generated
|
|
17
17
|
* @see https://github.com/webgptorg/promptbook
|
|
18
18
|
*/
|
|
19
|
-
export const PROMPTBOOK_ENGINE_VERSION: string_promptbook_version = '0.114.0-
|
|
19
|
+
export const PROMPTBOOK_ENGINE_VERSION: string_promptbook_version = '0.114.0-30';
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
22
|
* Represents the version string of the Promptbook engine.
|
|
23
|
-
* It follows semantic versioning (e.g., `0.114.0-
|
|
23
|
+
* It follows semantic versioning (e.g., `0.114.0-29`).
|
|
24
24
|
*
|
|
25
25
|
* @generated
|
|
26
26
|
*/
|
package/src/versions.txt
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Metadata key storing the comma-separated federated server URL list.
|
|
3
|
+
*
|
|
4
|
+
* @private shared Agents Server constant
|
|
5
|
+
*/
|
|
6
|
+
export declare const FEDERATED_SERVERS_METADATA_KEY: "FEDERATED_SERVERS";
|
|
1
7
|
/**
|
|
2
8
|
* Metadata key storing the delay between retry attempts when importing federated agent books.
|
|
3
9
|
*
|
package/umd/index.umd.js
CHANGED
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
* @generated
|
|
59
59
|
* @see https://github.com/webgptorg/promptbook
|
|
60
60
|
*/
|
|
61
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.114.0-
|
|
61
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.114.0-30';
|
|
62
62
|
/**
|
|
63
63
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
64
64
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -1853,6 +1853,8 @@
|
|
|
1853
1853
|
OpenAI examples: gpt-5.2-codex, default
|
|
1854
1854
|
Gemini examples: gemini-3-flash-preview, default
|
|
1855
1855
|
Qwen examples: qwen3.8-max, default
|
|
1856
|
+
|
|
1857
|
+
For openai-codex, "default" overrides no model at all and keeps the one configured in Codex itself, which is what a ChatGPT-account login accepts
|
|
1856
1858
|
`);
|
|
1857
1859
|
/**
|
|
1858
1860
|
* Commander description for the `--git-changes` option.
|
|
@@ -26870,6 +26872,9 @@
|
|
|
26870
26872
|
fi
|
|
26871
26873
|
`);
|
|
26872
26874
|
const thinkingLevel = (_a = options.thinkingLevel) !== null && _a !== void 0 ? _a : DEFAULT_CODEX_THINKING_LEVEL;
|
|
26875
|
+
// Note: Without an explicit model Codex keeps the model of its own configuration, which is what a
|
|
26876
|
+
// ChatGPT-account login needs — it rejects every model that Codex itself does not offer
|
|
26877
|
+
const modelArgument = options.model ? ` --model ${options.model}` : '';
|
|
26873
26878
|
const lines = [
|
|
26874
26879
|
'if [ -n "${PTBK_AGENTS_SERVER_ENV_FILE:-}" ] && [ -f "${PTBK_AGENTS_SERVER_ENV_FILE}" ]; then',
|
|
26875
26880
|
'set -a',
|
|
@@ -26896,7 +26901,7 @@
|
|
|
26896
26901
|
' "${CODEX_LOGIN_METHOD_ARGUMENTS[@]}" \\',
|
|
26897
26902
|
` -c model_reasoning_effort="${thinkingLevel}" \\`,
|
|
26898
26903
|
` --ask-for-approval ${options.askForApproval} \\`,
|
|
26899
|
-
` exec
|
|
26904
|
+
` exec${modelArgument} \\`,
|
|
26900
26905
|
...(options.isMachineReadableProgressEnabled ? [' --json \\'] : []),
|
|
26901
26906
|
' --local-provider none \\',
|
|
26902
26907
|
` --sandbox ${options.sandbox} \\`,
|
|
@@ -26944,6 +26949,9 @@
|
|
|
26944
26949
|
const DEFAULT_CODEX_COMPLETION_SHARE = 0.1;
|
|
26945
26950
|
/**
|
|
26946
26951
|
* Builds usage stats from Codex CLI output.
|
|
26952
|
+
*
|
|
26953
|
+
* The `modelName` is omitted when Codex ran without a model override, in which case only Codex knows which
|
|
26954
|
+
* model it picked and the price can be estimated from the fallback pricing alone.
|
|
26947
26955
|
*/
|
|
26948
26956
|
function buildCodexUsageFromOutput(output, modelName) {
|
|
26949
26957
|
const breakdown = parseCodexTokenBreakdown(output);
|
|
@@ -27080,18 +27088,25 @@
|
|
|
27080
27088
|
}
|
|
27081
27089
|
/**
|
|
27082
27090
|
* Resolves a pricing model to estimate Codex cost from total tokens.
|
|
27091
|
+
*
|
|
27092
|
+
* An unknown model — and a run without any model override, where Codex picked the model itself — is priced
|
|
27093
|
+
* with `CODEX_FALLBACK_PRICING_MODEL`, so the estimate stays in the right order of magnitude.
|
|
27083
27094
|
*/
|
|
27084
27095
|
function resolveCodexPricing(modelName) {
|
|
27085
27096
|
var _a, _b, _c;
|
|
27086
|
-
const
|
|
27097
|
+
const fallbackPricing = (_a = OPENAI_MODELS.find((model) => model.modelName === CODEX_FALLBACK_PRICING_MODEL)) === null || _a === void 0 ? void 0 : _a.pricing;
|
|
27098
|
+
if (modelName === undefined) {
|
|
27099
|
+
return fallbackPricing;
|
|
27100
|
+
}
|
|
27101
|
+
const exactMatch = (_b = OPENAI_MODELS.find((model) => model.modelName === modelName)) === null || _b === void 0 ? void 0 : _b.pricing;
|
|
27087
27102
|
if (exactMatch) {
|
|
27088
27103
|
return exactMatch;
|
|
27089
27104
|
}
|
|
27090
|
-
const prefixMatch = (
|
|
27105
|
+
const prefixMatch = (_c = OPENAI_MODELS.find((model) => modelName.startsWith(model.modelName))) === null || _c === void 0 ? void 0 : _c.pricing;
|
|
27091
27106
|
if (prefixMatch) {
|
|
27092
27107
|
return prefixMatch;
|
|
27093
27108
|
}
|
|
27094
|
-
return
|
|
27109
|
+
return fallbackPricing;
|
|
27095
27110
|
}
|
|
27096
27111
|
|
|
27097
27112
|
/**
|
|
@@ -27900,9 +27915,9 @@
|
|
|
27900
27915
|
}
|
|
27901
27916
|
|
|
27902
27917
|
/**
|
|
27903
|
-
*
|
|
27918
|
+
* Value of `--model` which asks for the default model of the selected harness instead of naming one.
|
|
27904
27919
|
*/
|
|
27905
|
-
const
|
|
27920
|
+
const DEFAULT_MODEL_NAME = 'default';
|
|
27906
27921
|
/**
|
|
27907
27922
|
* Constant for cline model.
|
|
27908
27923
|
*/
|
|
@@ -27929,7 +27944,7 @@
|
|
|
27929
27944
|
return createRunnerResolution(options, new ClineRunner({ model: CLINE_MODEL }));
|
|
27930
27945
|
}
|
|
27931
27946
|
if (agentName === 'github-copilot') {
|
|
27932
|
-
const actualRunnerModel = options.model ===
|
|
27947
|
+
const actualRunnerModel = options.model === DEFAULT_MODEL_NAME ? undefined : options.model;
|
|
27933
27948
|
return createRunnerResolution(options, new GitHubCopilotRunner({
|
|
27934
27949
|
model: actualRunnerModel,
|
|
27935
27950
|
thinkingLevel: options.thinkingLevel,
|
|
@@ -27961,7 +27976,9 @@
|
|
|
27961
27976
|
const actualRunnerModel = resolveRequiredModel({
|
|
27962
27977
|
agentName: 'openai-codex',
|
|
27963
27978
|
providedModel: options.model,
|
|
27964
|
-
|
|
27979
|
+
// Note: Codex must not be pinned to any model of ours, because a ChatGPT-account login only accepts the
|
|
27980
|
+
// models which Codex itself offers — `default` therefore keeps the model from `~/.codex/config.toml`
|
|
27981
|
+
defaultModel: undefined,
|
|
27965
27982
|
availableModels: OPENAI_MODELS.filter((model) => model.modelVariant === 'CHAT').map((model) => model.modelName),
|
|
27966
27983
|
exampleUsages: ['--harness openai-codex --model gpt-5.2-codex', '--harness openai-codex --model default'],
|
|
27967
27984
|
});
|
|
@@ -28044,12 +28061,15 @@
|
|
|
28044
28061
|
}
|
|
28045
28062
|
/**
|
|
28046
28063
|
* Resolves a runner model, allowing `default` but otherwise requiring an explicit value.
|
|
28064
|
+
*
|
|
28065
|
+
* The `defaultModel` of a harness is either the model name which `--model default` stands for, or `undefined`
|
|
28066
|
+
* when the harness must be started **without any model override** and keep the model of its own configuration.
|
|
28047
28067
|
*/
|
|
28048
28068
|
function resolveRequiredModel(options) {
|
|
28049
28069
|
if (!options.providedModel) {
|
|
28050
28070
|
exitForMissingModel(options.agentName, options.availableModels, options.exampleUsages);
|
|
28051
28071
|
}
|
|
28052
|
-
if (options.providedModel ===
|
|
28072
|
+
if (options.providedModel === DEFAULT_MODEL_NAME) {
|
|
28053
28073
|
return options.defaultModel;
|
|
28054
28074
|
}
|
|
28055
28075
|
return options.providedModel;
|
|
@@ -41418,6 +41438,11 @@
|
|
|
41418
41438
|
commandProcess.kill();
|
|
41419
41439
|
}
|
|
41420
41440
|
|
|
41441
|
+
/**
|
|
41442
|
+
* Metadata key storing the comma-separated federated server URL list.
|
|
41443
|
+
*
|
|
41444
|
+
* @private shared Agents Server constant
|
|
41445
|
+
*/
|
|
41421
41446
|
/**
|
|
41422
41447
|
* Metadata key storing the delay between retry attempts when importing federated agent books.
|
|
41423
41448
|
*
|