@bastani/atomic 0.9.23-alpha.1 → 0.9.24-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +29 -0
- package/dist/builtin/intercom/package.json +1 -1
- package/dist/builtin/mcp/CHANGELOG.md +6 -0
- package/dist/builtin/mcp/README.md +1 -0
- package/dist/builtin/mcp/index.bundle.mjs +244 -58
- package/dist/builtin/mcp/package.json +1 -1
- package/dist/builtin/subagents/CHANGELOG.md +6 -0
- package/dist/builtin/subagents/package.json +1 -1
- package/dist/builtin/web-access/package.json +1 -1
- package/dist/builtin/workflows/CHANGELOG.md +18 -0
- package/dist/builtin/workflows/builtin/{chunk-d3xhj946.js → chunk-cpw5gtzg.js} +1 -1
- package/dist/builtin/workflows/builtin/{chunk-kgn5wz1c.js → chunk-e1254zvd.js} +139 -15
- package/dist/builtin/workflows/builtin/{chunk-hj8mh07f.js → chunk-qy6g0baf.js} +1 -1
- package/dist/builtin/workflows/builtin/goal.js +2 -2
- package/dist/builtin/workflows/builtin/index.js +3 -3
- package/dist/builtin/workflows/builtin/ralph.js +2 -2
- package/dist/builtin/workflows/package.json +1 -1
- package/dist/builtin/workflows/skills/prompt-engineer/SKILL.md +1 -0
- package/dist/builtin/workflows/skills/prompt-engineer/references/claude_sonnet_5_5.md +131 -0
- package/dist/builtin/workflows/src/extension/index.bundle.mjs +187 -25
- package/dist/builtin/workflows/src/index.js +147 -17
- package/dist/core/agent-session-events.js +1 -1
- package/dist/core/agent-session-events.js.map +1 -1
- package/dist/core/agent-session-state.js +5 -2
- package/dist/core/agent-session-state.js.map +1 -1
- package/dist/core/extensions/api-types.d.ts +12 -0
- package/dist/core/extensions/api-types.d.ts.map +1 -1
- package/dist/core/extensions/api-types.js.map +1 -1
- package/dist/core/extensions/loader-api.d.ts.map +1 -1
- package/dist/core/extensions/loader-api.js +42 -0
- package/dist/core/extensions/loader-api.js.map +1 -1
- package/dist/core/extensions/loader-bindings.d.ts.map +1 -1
- package/dist/core/extensions/loader-bindings.js +13 -7
- package/dist/core/extensions/loader-bindings.js.map +1 -1
- package/dist/core/extensions/loader-resources.d.ts +3 -0
- package/dist/core/extensions/loader-resources.d.ts.map +1 -1
- package/dist/core/extensions/loader-resources.js.map +1 -1
- package/dist/core/extensions/loader-runtime.d.ts.map +1 -1
- package/dist/core/extensions/loader-runtime.js +2 -0
- package/dist/core/extensions/loader-runtime.js.map +1 -1
- package/dist/core/extensions/loader-virtual-modules.d.ts.map +1 -1
- package/dist/core/extensions/loader-virtual-modules.js +2 -0
- package/dist/core/extensions/loader-virtual-modules.js.map +1 -1
- package/dist/core/extensions/mcp-server-registry.d.ts +22 -0
- package/dist/core/extensions/mcp-server-registry.d.ts.map +1 -0
- package/dist/core/extensions/mcp-server-registry.js +51 -0
- package/dist/core/extensions/mcp-server-registry.js.map +1 -0
- package/dist/core/extensions/runtime-types.d.ts +3 -0
- package/dist/core/extensions/runtime-types.d.ts.map +1 -1
- package/dist/core/extensions/runtime-types.js.map +1 -1
- package/dist/core/keybindings.d.ts +1 -1
- package/dist/core/keybindings.d.ts.map +1 -1
- package/dist/core/keybindings.js +1 -1
- package/dist/core/keybindings.js.map +1 -1
- package/dist/core/mcp-servers.d.ts +39 -0
- package/dist/core/mcp-servers.d.ts.map +1 -0
- package/dist/core/mcp-servers.js +2 -0
- package/dist/core/mcp-servers.js.map +1 -0
- package/dist/core/model-resolver-defaults.js +2 -2
- package/dist/core/model-resolver-defaults.js.map +1 -1
- package/dist/core/package-manager-manifest.d.ts +3 -0
- package/dist/core/package-manager-manifest.d.ts.map +1 -1
- package/dist/core/package-manager-manifest.js +14 -0
- package/dist/core/package-manager-manifest.js.map +1 -1
- package/dist/core/package-manager-mcp-servers.d.ts +4 -0
- package/dist/core/package-manager-mcp-servers.d.ts.map +1 -0
- package/dist/core/package-manager-mcp-servers.js +53 -0
- package/dist/core/package-manager-mcp-servers.js.map +1 -0
- package/dist/core/package-manager-resource-accumulator.d.ts.map +1 -1
- package/dist/core/package-manager-resource-accumulator.js +2 -0
- package/dist/core/package-manager-resource-accumulator.js.map +1 -1
- package/dist/core/package-manager-resource-collector.d.ts.map +1 -1
- package/dist/core/package-manager-resource-collector.js +2 -0
- package/dist/core/package-manager-resource-collector.js.map +1 -1
- package/dist/core/package-manager-resource-patterns.d.ts +4 -0
- package/dist/core/package-manager-resource-patterns.d.ts.map +1 -1
- package/dist/core/package-manager-resource-patterns.js +36 -12
- package/dist/core/package-manager-resource-patterns.js.map +1 -1
- package/dist/core/package-manager-types.d.ts +14 -0
- package/dist/core/package-manager-types.d.ts.map +1 -1
- package/dist/core/package-manager-types.js.map +1 -1
- package/dist/core/package-manager.d.ts +1 -1
- package/dist/core/package-manager.d.ts.map +1 -1
- package/dist/core/package-manager.js.map +1 -1
- package/dist/core/resource-loader-core.d.ts +4 -0
- package/dist/core/resource-loader-core.d.ts.map +1 -1
- package/dist/core/resource-loader-core.js +7 -0
- package/dist/core/resource-loader-core.js.map +1 -1
- package/dist/core/resource-loader-helpers.d.ts.map +1 -1
- package/dist/core/resource-loader-helpers.js +1 -0
- package/dist/core/resource-loader-helpers.js.map +1 -1
- package/dist/core/resource-loader-internals.d.ts +2 -0
- package/dist/core/resource-loader-internals.d.ts.map +1 -1
- package/dist/core/resource-loader-internals.js.map +1 -1
- package/dist/core/resource-loader-package-resources.d.ts +3 -0
- package/dist/core/resource-loader-package-resources.d.ts.map +1 -1
- package/dist/core/resource-loader-package-resources.js +25 -2
- package/dist/core/resource-loader-package-resources.js.map +1 -1
- package/dist/core/resource-loader-reload.d.ts.map +1 -1
- package/dist/core/resource-loader-reload.js +4 -1
- package/dist/core/resource-loader-reload.js.map +1 -1
- package/dist/core/session-manager-core.d.ts +2 -0
- package/dist/core/session-manager-core.d.ts.map +1 -1
- package/dist/core/session-manager-core.js +6 -1
- package/dist/core/session-manager-core.js.map +1 -1
- package/dist/core/settings-types.d.ts +1 -0
- package/dist/core/settings-types.d.ts.map +1 -1
- package/dist/core/settings-types.js.map +1 -1
- package/dist/extensions/llama/provider.d.ts +1 -1
- package/dist/extensions/llama/provider.d.ts.map +1 -1
- package/dist/extensions/llama/provider.js +37 -10
- package/dist/extensions/llama/provider.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/modes/interactive/chat-input-actions.d.ts +12 -0
- package/dist/modes/interactive/chat-input-actions.d.ts.map +1 -1
- package/dist/modes/interactive/chat-input-actions.js +44 -18
- package/dist/modes/interactive/chat-input-actions.js.map +1 -1
- package/dist/modes/interactive/components/chat-session-host-editor.d.ts +11 -0
- package/dist/modes/interactive/components/chat-session-host-editor.d.ts.map +1 -1
- package/dist/modes/interactive/components/chat-session-host-editor.js +7 -1
- package/dist/modes/interactive/components/chat-session-host-editor.js.map +1 -1
- package/dist/modes/interactive/interactive-hotkeys-debug.js +1 -1
- package/dist/modes/interactive/interactive-hotkeys-debug.js.map +1 -1
- package/dist/modes/interactive/interactive-input-handling.js +3 -1
- package/dist/modes/interactive/interactive-input-handling.js.map +1 -1
- package/dist/modes/interactive/interactive-mode-helpers.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode-helpers.js +1 -6
- package/dist/modes/interactive/interactive-mode-helpers.js.map +1 -1
- package/dist/utils/clipboard-native.d.ts +2 -0
- package/dist/utils/clipboard-native.d.ts.map +1 -1
- package/dist/utils/clipboard-native.js.map +1 -1
- package/dist/utils/clipboard.d.ts +7 -0
- package/dist/utils/clipboard.d.ts.map +1 -1
- package/dist/utils/clipboard.js +37 -1
- package/dist/utils/clipboard.js.map +1 -1
- package/docs/extensions/api-reference.md +19 -0
- package/docs/extensions.md +4 -0
- package/docs/keybindings.md +2 -2
- package/docs/llama-cpp.md +13 -0
- package/docs/mcp-servers.md +18 -0
- package/docs/models/evals.md +16 -4
- package/docs/packages/authoring.md +27 -0
- package/docs/packages/reference.md +3 -2
- package/docs/packages.md +3 -2
- package/docs/skills.md +3 -1
- package/examples/extensions/gondolin/package-lock.json +3 -3
- package/npm-shrinkwrap.json +46 -46
- package/package.json +4 -4
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bastani/web-access",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.24-alpha.1",
|
|
4
4
|
"private": true,
|
|
5
5
|
"description": "Atomic extension for web search, URL fetching, GitHub repo cloning, PDF/video extraction. Fork of: https://github.com/nicobailon/pi-web-access",
|
|
6
6
|
"contributors": [
|
|
@@ -6,6 +6,24 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [0.9.24-alpha.1] - 2026-09-28
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- Added source-attributed Claude Sonnet 5.5 guidance to the prompt-engineering skill, covering recalibrated effort, carrying coding work through without unrequested additions, visible progress during tool loops, search and verification prompts, and placement of mid-turn user messages.
|
|
14
|
+
|
|
15
|
+
### Fixed
|
|
16
|
+
|
|
17
|
+
- A schema-backed stage whose structured-output correction hits a provider failure (for example a 429) that moves the stage to a new session now sends that session the original stage prompt followed by the correction request. Previously the new session received only the correction, so a model that never saw the task could complete the stage with a schema-valid but empty result ([#3323](https://github.com/bastani-inc/atomic/issues/3323)).
|
|
18
|
+
- Workflows from a package listed in a project's `.atomic/settings.json` are now registered as soon as you trust the project at startup. Previously `/workflow <name>` reported `Workflow not found` and `/workflow list` showed only the builtin workflows until you ran `/workflow reload`, even though the package's extensions and skills had loaded ([#3354](https://github.com/bastani-inc/atomic/issues/3354)).
|
|
19
|
+
|
|
20
|
+
## [0.9.23] - 2026-09-27
|
|
21
|
+
|
|
22
|
+
### Fixed
|
|
23
|
+
|
|
24
|
+
- Resuming a run that failed in a `ctx.tool` call now works when the call ran in parallel with other tools. Siblings that were cancelled or also threw when the run failed are run again on resume, in any order, instead of failing with `replay topology mismatch` or `unfinished or missing completed tool checkpoint`. A resume rejected by changed code no longer runs the failed tool or makes the run unresumable, including after Atomic restarts ([#3314](https://github.com/bastani-inc/atomic/issues/3314)).
|
|
25
|
+
- `model: "auto"` routing no longer ignores benchmark results when fewer than four models are available. Each model's results are now ranked against every model in the evals catalog rather than only the models you can route to, so with just two or three models (for example Opus and Haiku) the stronger model is no longer outranked on price alone, and a model scores the same however many models are enabled.
|
|
26
|
+
|
|
9
27
|
## [0.9.23-alpha.1] - 2026-09-27
|
|
10
28
|
|
|
11
29
|
### Fixed
|
|
@@ -2062,7 +2062,7 @@ var require_query = __commonJS(function(exports, module) {
|
|
|
2062
2062
|
if (typeof this.text !== "string" && typeof this.name !== "string") {
|
|
2063
2063
|
return new Error("A query must have either text or a name. Supplying neither is unsupported.");
|
|
2064
2064
|
}
|
|
2065
|
-
const previous = connection.parsedStatements[this.name];
|
|
2065
|
+
const previous = connection.parsedStatements[this.name] || connection.submittedNamedStatements[this.name];
|
|
2066
2066
|
if (this.text && previous && this.text !== previous) {
|
|
2067
2067
|
return new Error(`Prepared statements must be unique - '${this.name}' was used for a different statement`);
|
|
2068
2068
|
}
|
|
@@ -2082,7 +2082,7 @@ var require_query = __commonJS(function(exports, module) {
|
|
|
2082
2082
|
return null;
|
|
2083
2083
|
}
|
|
2084
2084
|
hasBeenParsed(connection) {
|
|
2085
|
-
return this.name && connection.parsedStatements[this.name];
|
|
2085
|
+
return this.name && (connection.parsedStatements[this.name] || connection.submittedNamedStatements[this.name]);
|
|
2086
2086
|
}
|
|
2087
2087
|
handlePortalSuspended(connection) {
|
|
2088
2088
|
this._getRows(connection, this.rows);
|
|
@@ -2105,6 +2105,9 @@ var require_query = __commonJS(function(exports, module) {
|
|
|
2105
2105
|
name: this.name,
|
|
2106
2106
|
types: this.types
|
|
2107
2107
|
});
|
|
2108
|
+
if (this.name) {
|
|
2109
|
+
connection.submittedNamedStatements[this.name] = this.text;
|
|
2110
|
+
}
|
|
2108
2111
|
}
|
|
2109
2112
|
try {
|
|
2110
2113
|
connection.bind({
|
|
@@ -2836,7 +2839,7 @@ var require_parser = __commonJS(function(exports) {
|
|
|
2836
2839
|
const parameterCount = reader.int16();
|
|
2837
2840
|
const message = new messages_1.ParameterDescriptionMessage(LATEINIT_LENGTH, parameterCount);
|
|
2838
2841
|
for (let i = 0;i < parameterCount; i++) {
|
|
2839
|
-
message.dataTypeIDs[i] = reader.
|
|
2842
|
+
message.dataTypeIDs[i] = reader.uint32();
|
|
2840
2843
|
}
|
|
2841
2844
|
return message;
|
|
2842
2845
|
};
|
|
@@ -3038,6 +3041,7 @@ var require_connection = __commonJS(function(exports, module) {
|
|
|
3038
3041
|
this._keepAlive = config.keepAlive;
|
|
3039
3042
|
this._keepAliveInitialDelayMillis = config.keepAliveInitialDelayMillis;
|
|
3040
3043
|
this.parsedStatements = {};
|
|
3044
|
+
this.submittedNamedStatements = {};
|
|
3041
3045
|
this.ssl = config.ssl || false;
|
|
3042
3046
|
this.sslNegotiation = config.sslNegotiation || "postgres";
|
|
3043
3047
|
this._ending = false;
|
|
@@ -3558,6 +3562,8 @@ var require_client = __commonJS(function(exports, module) {
|
|
|
3558
3562
|
encoding: this.connectionParameters.client_encoding || "utf8"
|
|
3559
3563
|
});
|
|
3560
3564
|
this._queryQueue = [];
|
|
3565
|
+
this._sentQueryQueue = [];
|
|
3566
|
+
this.pipeline = Boolean(c.pipeline);
|
|
3561
3567
|
this.binary = c.binary || defaults.binary;
|
|
3562
3568
|
this.processID = null;
|
|
3563
3569
|
this.secretKey = null;
|
|
@@ -3592,6 +3598,8 @@ var require_client = __commonJS(function(exports, module) {
|
|
|
3592
3598
|
enqueueError(activeQuery);
|
|
3593
3599
|
this._activeQuery = null;
|
|
3594
3600
|
}
|
|
3601
|
+
this._sentQueryQueue.forEach(enqueueError);
|
|
3602
|
+
this._sentQueryQueue.length = 0;
|
|
3595
3603
|
this._queryQueue.forEach(enqueueError);
|
|
3596
3604
|
this._queryQueue.length = 0;
|
|
3597
3605
|
}
|
|
@@ -3819,6 +3827,9 @@ var require_client = __commonJS(function(exports, module) {
|
|
|
3819
3827
|
return;
|
|
3820
3828
|
}
|
|
3821
3829
|
this._activeQuery = null;
|
|
3830
|
+
if (activeQuery.name) {
|
|
3831
|
+
delete this.connection.submittedNamedStatements[activeQuery.name];
|
|
3832
|
+
}
|
|
3822
3833
|
activeQuery.handleError(msg, this.connection);
|
|
3823
3834
|
}
|
|
3824
3835
|
_handleRowDescription(msg) {
|
|
@@ -3875,6 +3886,7 @@ var require_client = __commonJS(function(exports, module) {
|
|
|
3875
3886
|
}
|
|
3876
3887
|
if (activeQuery.name) {
|
|
3877
3888
|
this.connection.parsedStatements[activeQuery.name] = activeQuery.text;
|
|
3889
|
+
delete this.connection.submittedNamedStatements[activeQuery.name];
|
|
3878
3890
|
}
|
|
3879
3891
|
}
|
|
3880
3892
|
_handleCopyInResponse(msg) {
|
|
@@ -3941,6 +3953,8 @@ var require_client = __commonJS(function(exports, module) {
|
|
|
3941
3953
|
});
|
|
3942
3954
|
} else if (client._queryQueue.indexOf(query) !== -1) {
|
|
3943
3955
|
client._queryQueue.splice(client._queryQueue.indexOf(query), 1);
|
|
3956
|
+
} else if (client._sentQueryQueue.indexOf(query) !== -1) {
|
|
3957
|
+
query.callback = () => {};
|
|
3944
3958
|
}
|
|
3945
3959
|
}
|
|
3946
3960
|
setTypeParser(oid, format, parseFn) {
|
|
@@ -3956,6 +3970,10 @@ var require_client = __commonJS(function(exports, module) {
|
|
|
3956
3970
|
return utils.escapeLiteral(str);
|
|
3957
3971
|
}
|
|
3958
3972
|
_pulseQueryQueue() {
|
|
3973
|
+
if (this.pipeline) {
|
|
3974
|
+
this._pulsePipelinedQueryQueue();
|
|
3975
|
+
return;
|
|
3976
|
+
}
|
|
3959
3977
|
if (this.readyForQuery === true) {
|
|
3960
3978
|
this._activeQuery = this._queryQueue.shift();
|
|
3961
3979
|
const activeQuery = this._getActiveQuery();
|
|
@@ -3976,6 +3994,30 @@ var require_client = __commonJS(function(exports, module) {
|
|
|
3976
3994
|
}
|
|
3977
3995
|
}
|
|
3978
3996
|
}
|
|
3997
|
+
_pulsePipelinedQueryQueue() {
|
|
3998
|
+
if (!this._connected || !this._queryable) {
|
|
3999
|
+
return;
|
|
4000
|
+
}
|
|
4001
|
+
while (this._queryQueue.length > 0) {
|
|
4002
|
+
const query = this._queryQueue.shift();
|
|
4003
|
+
this.hasExecuted = true;
|
|
4004
|
+
const queryError = query.submit(this.connection);
|
|
4005
|
+
if (queryError) {
|
|
4006
|
+
process.nextTick(() => {
|
|
4007
|
+
query.handleError(queryError, this.connection);
|
|
4008
|
+
});
|
|
4009
|
+
continue;
|
|
4010
|
+
}
|
|
4011
|
+
this._sentQueryQueue.push(query);
|
|
4012
|
+
}
|
|
4013
|
+
if (this.readyForQuery && !this._activeQuery && this._sentQueryQueue.length > 0) {
|
|
4014
|
+
this._activeQuery = this._sentQueryQueue.shift();
|
|
4015
|
+
this.readyForQuery = false;
|
|
4016
|
+
}
|
|
4017
|
+
if (!this._activeQuery && this._sentQueryQueue.length === 0 && this._queryQueue.length === 0 && this.hasExecuted) {
|
|
4018
|
+
this.emit("drain");
|
|
4019
|
+
}
|
|
4020
|
+
}
|
|
3979
4021
|
query(config, values, callback) {
|
|
3980
4022
|
let query;
|
|
3981
4023
|
let result;
|
|
@@ -4017,6 +4059,9 @@ var require_client = __commonJS(function(exports, module) {
|
|
|
4017
4059
|
const index = this._queryQueue.indexOf(query);
|
|
4018
4060
|
if (index > -1) {
|
|
4019
4061
|
this._queryQueue.splice(index, 1);
|
|
4062
|
+
} else if (this.pipeline) {
|
|
4063
|
+
this.connection.stream.destroy();
|
|
4064
|
+
return;
|
|
4020
4065
|
}
|
|
4021
4066
|
this._pulseQueryQueue();
|
|
4022
4067
|
}, readTimeout);
|
|
@@ -4043,7 +4088,7 @@ var require_client = __commonJS(function(exports, module) {
|
|
|
4043
4088
|
});
|
|
4044
4089
|
return result;
|
|
4045
4090
|
}
|
|
4046
|
-
if (this._queryQueue.length > 0) {
|
|
4091
|
+
if (this._queryQueue.length > 0 && !this.pipeline) {
|
|
4047
4092
|
queryQueueLengthDeprecationNotice();
|
|
4048
4093
|
}
|
|
4049
4094
|
this._queryQueue.push(query);
|
|
@@ -4069,7 +4114,11 @@ var require_client = __commonJS(function(exports, module) {
|
|
|
4069
4114
|
return this._Promise.resolve();
|
|
4070
4115
|
}
|
|
4071
4116
|
}
|
|
4072
|
-
if (
|
|
4117
|
+
if (!this._queryable) {
|
|
4118
|
+
this.connection.stream.destroy();
|
|
4119
|
+
} else if (this.pipeline && (this._getActiveQuery() || this._sentQueryQueue.length > 0 || this._queryQueue.length > 0)) {
|
|
4120
|
+
this.once("drain", () => this.connection.end());
|
|
4121
|
+
} else if (this._getActiveQuery()) {
|
|
4073
4122
|
this.connection.stream.destroy();
|
|
4074
4123
|
} else {
|
|
4075
4124
|
this.connection.end();
|
|
@@ -4540,7 +4589,7 @@ var require_query2 = __commonJS(function(exports, module) {
|
|
|
4540
4589
|
sourceFunction: "routine"
|
|
4541
4590
|
};
|
|
4542
4591
|
NativeQuery.prototype.handleError = function(err) {
|
|
4543
|
-
const fields = this.native.pq.resultErrorFields();
|
|
4592
|
+
const fields = this.native && this.native.pq.resultErrorFields();
|
|
4544
4593
|
if (fields) {
|
|
4545
4594
|
for (const key in fields) {
|
|
4546
4595
|
const normalizedFieldName = errorFieldMap[key] || key;
|
|
@@ -4667,6 +4716,8 @@ var require_client2 = __commonJS(function(exports, module) {
|
|
|
4667
4716
|
this._connecting = false;
|
|
4668
4717
|
this._connected = false;
|
|
4669
4718
|
this._queryable = true;
|
|
4719
|
+
this.pipeline = Boolean(config.pipeline);
|
|
4720
|
+
this._pipelineInFlight = false;
|
|
4670
4721
|
const cp = this.connectionParameters = new ConnectionParameters(config);
|
|
4671
4722
|
if (config.nativeConnectionString)
|
|
4672
4723
|
cp.nativeConnectionString = config.nativeConnectionString;
|
|
@@ -4811,7 +4862,7 @@ var require_client2 = __commonJS(function(exports, module) {
|
|
|
4811
4862
|
});
|
|
4812
4863
|
return result;
|
|
4813
4864
|
}
|
|
4814
|
-
if (this._queryQueue.length > 0) {
|
|
4865
|
+
if (this._queryQueue.length > 0 && !this.pipeline) {
|
|
4815
4866
|
queryQueueLengthDeprecationNotice();
|
|
4816
4867
|
}
|
|
4817
4868
|
this._queryQueue.push(query);
|
|
@@ -4832,15 +4883,22 @@ var require_client2 = __commonJS(function(exports, module) {
|
|
|
4832
4883
|
cb = (err) => err ? reject(err) : resolve();
|
|
4833
4884
|
});
|
|
4834
4885
|
}
|
|
4835
|
-
|
|
4836
|
-
self.
|
|
4837
|
-
|
|
4838
|
-
|
|
4839
|
-
|
|
4840
|
-
|
|
4841
|
-
cb
|
|
4886
|
+
const doEnd = function() {
|
|
4887
|
+
self.native.end(function() {
|
|
4888
|
+
self._connected = false;
|
|
4889
|
+
self._errorAllQueries(new Error("Connection terminated"));
|
|
4890
|
+
process.nextTick(() => {
|
|
4891
|
+
self.emit("end");
|
|
4892
|
+
if (cb)
|
|
4893
|
+
cb();
|
|
4894
|
+
});
|
|
4842
4895
|
});
|
|
4843
|
-
}
|
|
4896
|
+
};
|
|
4897
|
+
if (this.pipeline && (this._pipelineInFlight || this._queryQueue.length > 0)) {
|
|
4898
|
+
this.once("drain", doEnd);
|
|
4899
|
+
} else {
|
|
4900
|
+
doEnd();
|
|
4901
|
+
}
|
|
4844
4902
|
return result;
|
|
4845
4903
|
};
|
|
4846
4904
|
Client.prototype._hasActiveQuery = function() {
|
|
@@ -4850,6 +4908,9 @@ var require_client2 = __commonJS(function(exports, module) {
|
|
|
4850
4908
|
if (!this._connected) {
|
|
4851
4909
|
return;
|
|
4852
4910
|
}
|
|
4911
|
+
if (this.pipeline && !initialConnection) {
|
|
4912
|
+
return this._pulsePipelinedQueryQueue();
|
|
4913
|
+
}
|
|
4853
4914
|
if (this._hasActiveQuery()) {
|
|
4854
4915
|
return;
|
|
4855
4916
|
}
|
|
@@ -4867,6 +4928,69 @@ var require_client2 = __commonJS(function(exports, module) {
|
|
|
4867
4928
|
self._pulseQueryQueue();
|
|
4868
4929
|
});
|
|
4869
4930
|
};
|
|
4931
|
+
Client.prototype._pulsePipelinedQueryQueue = function() {
|
|
4932
|
+
if (!this._connected || this._pipelineInFlight) {
|
|
4933
|
+
return;
|
|
4934
|
+
}
|
|
4935
|
+
if (this._queryQueue.length === 0) {
|
|
4936
|
+
if (this.hasExecuted) {
|
|
4937
|
+
this.emit("drain");
|
|
4938
|
+
}
|
|
4939
|
+
return;
|
|
4940
|
+
}
|
|
4941
|
+
this._pipelineInFlight = true;
|
|
4942
|
+
const self = this;
|
|
4943
|
+
const queries = [];
|
|
4944
|
+
const nativeQueries = [];
|
|
4945
|
+
const utils = require_utils();
|
|
4946
|
+
while (this._queryQueue.length > 0) {
|
|
4947
|
+
const query = this._queryQueue.shift();
|
|
4948
|
+
this.hasExecuted = true;
|
|
4949
|
+
nativeQueries.push(query);
|
|
4950
|
+
const values = query.values ? query.values.map(utils.prepareValue) : null;
|
|
4951
|
+
const pipelineEntry = { text: query.text, name: query.name };
|
|
4952
|
+
if (values) {
|
|
4953
|
+
pipelineEntry.values = values;
|
|
4954
|
+
}
|
|
4955
|
+
if (query.name && this.namedQueries[query.name]) {
|
|
4956
|
+
pipelineEntry._alreadyPrepared = true;
|
|
4957
|
+
}
|
|
4958
|
+
queries.push(pipelineEntry);
|
|
4959
|
+
}
|
|
4960
|
+
this.native.pipeline(queries, function(err, results) {
|
|
4961
|
+
self._pipelineInFlight = false;
|
|
4962
|
+
if (err) {
|
|
4963
|
+
for (let i = 0;i < nativeQueries.length; i++) {
|
|
4964
|
+
const q = nativeQueries[i];
|
|
4965
|
+
q.native = self.native;
|
|
4966
|
+
q.handleError(err);
|
|
4967
|
+
}
|
|
4968
|
+
self._pulsePipelinedQueryQueue();
|
|
4969
|
+
return;
|
|
4970
|
+
}
|
|
4971
|
+
for (let i = 0;i < nativeQueries.length; i++) {
|
|
4972
|
+
const q = nativeQueries[i];
|
|
4973
|
+
const r = results[i];
|
|
4974
|
+
q.native = self.native;
|
|
4975
|
+
if (r.err) {
|
|
4976
|
+
q.handleError(r.err);
|
|
4977
|
+
} else {
|
|
4978
|
+
if (q.name) {
|
|
4979
|
+
self.namedQueries[q.name] = q.text;
|
|
4980
|
+
}
|
|
4981
|
+
q.state = "end";
|
|
4982
|
+
q.emit("end", r.result);
|
|
4983
|
+
if (q.callback) {
|
|
4984
|
+
q.callback(null, r.result);
|
|
4985
|
+
}
|
|
4986
|
+
}
|
|
4987
|
+
setImmediate(function() {
|
|
4988
|
+
q.emit("_done");
|
|
4989
|
+
});
|
|
4990
|
+
}
|
|
4991
|
+
self._pulsePipelinedQueryQueue();
|
|
4992
|
+
});
|
|
4993
|
+
};
|
|
4870
4994
|
Client.prototype.cancel = function(query) {
|
|
4871
4995
|
if (this._activeQuery === query) {
|
|
4872
4996
|
this.native.cancel(function() {});
|
|
@@ -14,11 +14,11 @@ import {
|
|
|
14
14
|
import {
|
|
15
15
|
generate_and_filter_default
|
|
16
16
|
} from "./chunk-kb7s3gx2.js";
|
|
17
|
-
import"./chunk-
|
|
17
|
+
import"./chunk-e1254zvd.js";
|
|
18
18
|
import"./chunk-z0d03ktm.js";
|
|
19
19
|
import {
|
|
20
20
|
goal_default
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-qy6g0baf.js";
|
|
22
22
|
import {
|
|
23
23
|
open_claude_design_default
|
|
24
24
|
} from "./chunk-nkj4qhj6.js";
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
} from "./chunk-94f8zfz1.js";
|
|
28
28
|
import {
|
|
29
29
|
ralph_default
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-cpw5gtzg.js";
|
|
31
31
|
import {
|
|
32
32
|
tournament_default
|
|
33
33
|
} from "./chunk-wf876n16.js";
|
|
@@ -36,6 +36,7 @@ Create or revise prompts for the user's target model. Keep the common prompt por
|
|
|
36
36
|
| Claude Opus 5.5 | `references/claude_opus_5_5.md` | Always-on thinking, progress cadence, bounded unattended continuation, pasted-content boundaries |
|
|
37
37
|
| Claude Opus 5 | `references/claude_opus_5.md` | Separate response length from effort, remove redundant verification, bound delegation |
|
|
38
38
|
| Claude Opus 4.8 | `references/claude_opus_4_8.md` | Steerable thinking, literal scope, tool triggering, design alternatives |
|
|
39
|
+
| Claude Sonnet 5.5 | `references/claude_sonnet_5_5.md` | Recalibrated effort, carrying coding work through, scope limits, silent tool loops, search and verification prompts, mid-turn message placement |
|
|
39
40
|
| Claude Sonnet 5 | `references/claude_sonnet_5.md` | Thinking on by default, variety through prompts instead of sampling, literal scope and review recall |
|
|
40
41
|
|
|
41
42
|
For a migration, read both source and target pages when both are listed. For a cross-model prompt, keep common requirements in the main contract and isolate only the differences that affect behavior. Do not load every page for a single-model task.
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
# Claude Sonnet 5.5 prompting
|
|
2
|
+
|
|
3
|
+
Distilled from [Anthropic's Sonnet 5.5 prompting guide](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/prompting-claude-sonnet-5-5), [What's new in Claude Sonnet 5.5](https://platform.claude.com/docs/en/models/sonnet-5-5/whats-new-sonnet-5-5), and the [migration guide](https://platform.claude.com/docs/en/models/sonnet-5-5/migration-guide), checked September 28, 2026. Anthropic says existing Sonnet 5 prompts should perform well unchanged and the [Sonnet 5 page](claude_sonnet_5.md) remains a reasonable starting point; for the hardest long-horizon work, it recommends an Opus model. The snippets below are adaptations, not verbatim source quotations. Use the section matching the observed behavior, not every snippet at once.
|
|
4
|
+
|
|
5
|
+
## When coding work stops to check in before it is done
|
|
6
|
+
|
|
7
|
+
At lower effort on long agentic coding tasks, the model sometimes pauses to confirm a plan, asks a question it could answer itself, or stops after one part of a multipart task. Try a higher effort level first. To keep the effort level, add a completion rule:
|
|
8
|
+
|
|
9
|
+
```text
|
|
10
|
+
Keep working until everything the user asked for is done. Stop to ask only when you cannot continue without the user, or before a risky step.
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Sessions then run longer and cost more at low and medium effort. The rule does not replace your own rules about risky or irreversible actions; keep those in the system prompt.
|
|
14
|
+
|
|
15
|
+
## When coding changes include work nobody asked for
|
|
16
|
+
|
|
17
|
+
The model tends to add tests, documentation, and small supporting files that fit the repository's conventions, at every effort level and more at higher effort. The requested change itself stays close to the request. Many teams want this. If yours does not, add a scope rule:
|
|
18
|
+
|
|
19
|
+
```text
|
|
20
|
+
When the requested work is done and checked, stop and report. Do not add features, tests, files, docs, or refactors that were not requested. If one would help, mention it at the end instead of doing it.
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
At the highest effort levels, this rule also makes changes smaller overall.
|
|
24
|
+
|
|
25
|
+
## When high-effort runs start their own review rounds
|
|
26
|
+
|
|
27
|
+
At the highest effort levels, the model can start extra rounds of review and verification after finishing, sometimes through reviewer subagents if the harness provides them, and make related fixes it noticed along the way. Run routine work at a lower effort, where this is rare. To keep the higher effort but aim it at the task:
|
|
28
|
+
|
|
29
|
+
```text
|
|
30
|
+
When the requested work is done and its checks pass, stop and report. Do not start extra rounds of review or hardening on your own, and do not launch reviewer subagents unless the user asked for a review. If a deeper review seems worthwhile, say so at the end.
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
The source reports that this makes self-started review rounds less frequent without removing them entirely.
|
|
34
|
+
|
|
35
|
+
## When a request for ideas turns into a build
|
|
36
|
+
|
|
37
|
+
On an open-ended request such as "show me what you can do with this", the model can start building a presentation, report, or video when the user only wanted ideas. Say so in the request, or add:
|
|
38
|
+
|
|
39
|
+
```text
|
|
40
|
+
When the user asks for ideas, options, or a plan, give them that and stop. Do not build or change anything until the user says to go ahead.
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## When JSON answers to multistep problems are wrong or do not parse
|
|
44
|
+
|
|
45
|
+
For tasks that need a few steps of working out, such as totaling figures, applying a rule, or ranking items, the model often answers without thinking first, especially at lower effort. When thinking is available, end the system prompt with:
|
|
46
|
+
|
|
47
|
+
```text
|
|
48
|
+
Think the problem through before you answer.
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
The line has no effect when the model runs without up-front thinking in a request without tools; use thinking for these tasks. Raising effort also helps.
|
|
52
|
+
|
|
53
|
+
If the application asks for JSON only through the prompt rather than an enforced schema, the model often works the problem out in the text and writes the JSON at the end. Have the parser take the last complete JSON value from the text, not everything from the first brace to the last, because a draft can precede the final JSON. Check the expected fields and retry once if they are missing. Treat a response that stopped at the output limit as failed even if it contains valid JSON.
|
|
54
|
+
|
|
55
|
+
## When long agentic turns look silent
|
|
56
|
+
|
|
57
|
+
Between tool calls, the model writes short notes on what it found and what it will do next. Longer notes come back as progress-update thinking blocks, which are empty by default, so a client that renders only text can look silent. A prompt cannot fix that; the application must request and render those notes, as the migration guide describes.
|
|
58
|
+
|
|
59
|
+
Then remove inherited instructions such as "hold all findings for the final response." If you want updates at predictable points, which helps most in human-in-the-loop work, say where:
|
|
60
|
+
|
|
61
|
+
```text
|
|
62
|
+
Before your first tool call, say in one line what you are about to do. End with a short recap of what you did and what remains.
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
If long turns still go quiet, the harness can count consecutive tool steps with no user-visible update and, after several (the source's example is five), append a one-turn system reminder after the latest tool results:
|
|
66
|
+
|
|
67
|
+
```text
|
|
68
|
+
The user has not heard from you in a while. Say in a few words what you are doing, then continue.
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Stop after the second or third reminder, and leave earlier reminders in the history rather than deleting them. Frequent harness text after tool results can make the model suspect prompt injection. When the model must show exact text mid-turn, such as a code snippet or a question it needs answered, give it a simple tool for messaging the user, declared from the first request, and say to use it only for such content.
|
|
72
|
+
|
|
73
|
+
## When the model answers from memory instead of searching
|
|
74
|
+
|
|
75
|
+
On chat and knowledge-work tasks, the model sometimes answers from training knowledge when a search would catch changed details, such as what is allowed, required, or charged. First remove language that discourages tool use, such as "only use tools when strictly necessary" or "minimize tool calls." If the product exposes a search tool, add:
|
|
76
|
+
|
|
77
|
+
```text
|
|
78
|
+
Use the search tool to check specifics that may have changed since your training, such as what is allowed, required, or charged, even when you feel confident. For researched work such as a report or comparison, gather current sources rather than writing from training knowledge.
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
This matters most for research and support products.
|
|
82
|
+
|
|
83
|
+
## When mid-task user messages are ignored or flagged as injected
|
|
84
|
+
|
|
85
|
+
The model is trained to resist instructions that arrive through tool results and other content it reads. Text placed right after tool results can therefore be mistaken for injection, and the model may ignore a genuine user message or ask the user to confirm it. Fix the message layout rather than the prompt:
|
|
86
|
+
|
|
87
|
+
- Never put the user's words inside a tool result.
|
|
88
|
+
- Deliver mid-turn user input as user text after the last tool result in the same user message.
|
|
89
|
+
- Keep harness notices, such as reminders, in a separate system message after the user's words, never in the same block.
|
|
90
|
+
- In interactive sessions where users can type mid-turn, do not append your own token or budget countdown after every tool result.
|
|
91
|
+
|
|
92
|
+
If an occasional reminder of your own triggers this reaction, send it less often.
|
|
93
|
+
|
|
94
|
+
## When code changes are reported done without a real check
|
|
95
|
+
|
|
96
|
+
The model generally checks its work before reporting a change done. At low effort, it sometimes skips a check that exercises the change, for example because dependencies are not installed. If transcripts show completion claims without test or build output, add:
|
|
97
|
+
|
|
98
|
+
```text
|
|
99
|
+
When you change code that can be run, built, or type-checked, run a real check that exercises the change before reporting it done: the project's tests, type-checker, or build, or the changed command itself. A syntax-only check, or a check command that failed to start, does not count. If only the project's declared dependencies are missing, install them with the project's own package manager and lockfile, never with sudo or the system package manager, unless told not to. If no real check can run, say which check you did not run and why instead of reporting the change as done.
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Drop or adjust the dependency sentence where installation is not authorized.
|
|
103
|
+
|
|
104
|
+
## When tool calls use the wrong name or parameter spelling
|
|
105
|
+
|
|
106
|
+
The model occasionally calls a declared tool by a name that differs only in letter case, such as `bash` for `Bash`, or passes a known parameter under a slightly different name. Do not treat this as fatal. The harness can accept an unambiguous match, or return a tool error that names the exact expected spelling; the model usually corrects the call on its next turn.
|
|
107
|
+
|
|
108
|
+
```text
|
|
109
|
+
Unknown tool "bash". Did you mean "Bash"? Call it with that exact name.
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
## When dense charts or technical drawings are misread
|
|
113
|
+
|
|
114
|
+
Give the model a way to crop, zoom, or run code on the image. For charts, tools help at every effort level and more than raising effort does. For technical drawings, they help only at higher effort. Anthropic's [crop tool recipe](https://platform.claude.com/cookbook/multimodal-crop-tool) has a working definition.
|
|
115
|
+
|
|
116
|
+
```text
|
|
117
|
+
Read the requested values from the supplied image. Use the image tools to inspect the relevant regions, and check axes, units, and legend before reporting a value. If a detail stays unreadable, say which one instead of guessing a precise value.
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
## Thinking, effort, tool, and refusal notes
|
|
121
|
+
|
|
122
|
+
- Effort is the main control for how much the model thinks. Levels are recalibrated, so re-run your effort evaluation instead of carrying over the Sonnet 5 setting. Anthropic suggests starting at high in general, at medium for well-specified agentic coding and multistep tool use (high for harder or longer tasks), and at medium or low for chat and latency-sensitive work.
|
|
123
|
+
- Asking the model in the system prompt to think less does not reliably reduce its thinking; lower effort instead. When running without up-front thinking, remove "don't think" instructions, which make internal XML tags more likely to appear in visible output.
|
|
124
|
+
- Forced tool choice is not available. The model decides whether to call a tool, so say in the prompt when each tool applies.
|
|
125
|
+
- Keep conversations append-only. Change instructions or tools by appending a system message rather than editing earlier history.
|
|
126
|
+
- Prefill is not available. Ask for a direct answer in the system prompt instead of prefilling a preamble, and move continuations into the user turn, for example: "Your previous response was interrupted and ended with [previous response]. Continue from where you left off."
|
|
127
|
+
- Remove instructions that ask the model to include its reasoning in the response; they invite reasoning-extraction refusals. Request conclusions and evidence instead. Safety classifiers can also decline requests in cyber, biology, and other usage-policy areas, and benign work occasionally triggers them. The application handles those declines through refusal handling and fallback; removing reasoning requests is the only prompt-side fix the source gives.
|
|
128
|
+
|
|
129
|
+
## Validate the selected adjustment
|
|
130
|
+
|
|
131
|
+
Compare representative cases before and after one change: a multipart coding task at your chosen effort, an open-ended request, a JSON answer to a multistep problem, a long tool loop viewed through your client, a question that depends on current facts, and a mid-turn user message. Check task completion, unrequested additions, visible updates, actual tool calls, parse success, latency, tokens, and cost. Label every check not run.
|