@humain/humain-code 0.4.1 → 0.4.3

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.
Files changed (30) hide show
  1. package/CHANGELOG.md +37 -0
  2. package/dist/bundle/agent-monitor.js +1 -1
  3. package/dist/bundle/chunks/bedrock-converse-stream.js +23 -28
  4. package/dist/bundle/chunks/{chunk-7LDXR4AN.js → chunk-FHLF33QE.js} +180 -177
  5. package/dist/bundle/chunks/{chunk-OYDXJK4L.js → chunk-H6YXYISM.js} +316 -315
  6. package/dist/bundle/chunks/{chunk-KMMH6Z2Y.js → chunk-IUZLRXBD.js} +2 -2
  7. package/dist/bundle/chunks/{chunk-UBQSONVR.js → chunk-Q5TQLAOM.js} +1 -1
  8. package/dist/bundle/chunks/{chunk-N23FFKJU.js → chunk-T45HXZW7.js} +4 -4
  9. package/dist/bundle/chunks/{compat-GXD2ZGMZ.js → compat-HHX6L5CV.js} +1 -1
  10. package/dist/bundle/chunks/{dist-IKSCGVMG.js → dist-PHLMPB47.js} +566 -506
  11. package/dist/bundle/chunks/{event-streams-CGCQQL5M.js → event-streams-PKTMLNE5.js} +1 -1
  12. package/dist/bundle/chunks/{virtual-modules-BYOLP3HY.js → virtual-modules-3UEIUCY5.js} +2 -2
  13. package/dist/bundle/cli-runtime.js +2 -2
  14. package/dist/bundle/flow/assets/orchestrator-profiles.json +32 -32
  15. package/dist/bundle/flow/assets/profiles/oss-first.json +37 -72
  16. package/dist/bundle/flow/assets/profiles/premium.json +5 -5
  17. package/dist/bundle/flow/package.json +1 -1
  18. package/dist/bundle/index.js +4 -4
  19. package/dist/bundle/rpc-entry.js +2 -2
  20. package/dist/core/tools/subagent.d.ts +2 -0
  21. package/dist/core/tools/subagent.d.ts.map +1 -1
  22. package/dist/core/tools/subagent.js +72 -3
  23. package/dist/core/tools/subagent.js.map +1 -1
  24. package/dist/humain/flow-loader.d.ts.map +1 -1
  25. package/dist/humain/flow-loader.js +89 -4
  26. package/dist/humain/flow-loader.js.map +1 -1
  27. package/docs/flow-profiles.md +4 -2
  28. package/docs/flow.md +11 -3
  29. package/npm-shrinkwrap.json +6 -6
  30. package/package.json +2 -2
@@ -1,2 +1,2 @@
1
1
  import { createRequire as __piCreateRequire } from "node:module"; const require = __piCreateRequire(import.meta.url);
2
- import{EventStreamCodec,EventStreamMarshaller,EventStreamMarshaller2,EventStreamSerde,HeaderMarshaller,Int64,MessageDecoderStream,MessageEncoderStream,SmithyMessageDecoderStream,SmithyMessageEncoderStream,eventStreamSerdeProvider,eventStreamSerdeProvider2,getChunkedStream,getMessageUnmarshaller,getUnmarshalledStream,init_event_streams,iterableToReadableStream,readableStreamToIterable,resolveEventStreamSerdeConfig}from"./chunk-UBQSONVR.js";import"./chunk-JXWJOIH4.js";init_event_streams();export{EventStreamCodec,EventStreamMarshaller2 as EventStreamMarshaller,EventStreamSerde,HeaderMarshaller,Int64,MessageDecoderStream,MessageEncoderStream,SmithyMessageDecoderStream,SmithyMessageEncoderStream,EventStreamMarshaller as UniversalEventStreamMarshaller,eventStreamSerdeProvider2 as eventStreamSerdeProvider,getChunkedStream,getMessageUnmarshaller,getUnmarshalledStream,iterableToReadableStream,readableStreamToIterable,resolveEventStreamSerdeConfig,eventStreamSerdeProvider as universalEventStreamSerdeProvider};
2
+ import{EventStreamCodec,EventStreamMarshaller,EventStreamMarshaller2,EventStreamSerde,HeaderMarshaller,Int64,MessageDecoderStream,MessageEncoderStream,SmithyMessageDecoderStream,SmithyMessageEncoderStream,eventStreamSerdeProvider,eventStreamSerdeProvider2,getChunkedStream,getMessageUnmarshaller,getUnmarshalledStream,init_event_streams,iterableToReadableStream,readableStreamToIterable,resolveEventStreamSerdeConfig}from"./chunk-Q5TQLAOM.js";import"./chunk-JXWJOIH4.js";init_event_streams();export{EventStreamCodec,EventStreamMarshaller2 as EventStreamMarshaller,EventStreamSerde,HeaderMarshaller,Int64,MessageDecoderStream,MessageEncoderStream,SmithyMessageDecoderStream,SmithyMessageEncoderStream,EventStreamMarshaller as UniversalEventStreamMarshaller,eventStreamSerdeProvider2 as eventStreamSerdeProvider,getChunkedStream,getMessageUnmarshaller,getUnmarshalledStream,iterableToReadableStream,readableStreamToIterable,resolveEventStreamSerdeConfig,eventStreamSerdeProvider as universalEventStreamSerdeProvider};
@@ -1,5 +1,5 @@
1
1
  import { createRequire as __piCreateRequire } from "node:module"; const require = __piCreateRequire(import.meta.url);
2
- import{dist_exports as dist_exports3}from"./chunk-KMMH6Z2Y.js";import{dist_exports as dist_exports2}from"./chunk-7LDXR4AN.js";import"./chunk-3ZI2TEVB.js";import"./chunk-H5CZL7M5.js";import"./chunk-UBQSONVR.js";import"./chunk-2KKLZK2N.js";import{all_exports,compat_exports}from"./chunk-OYDXJK4L.js";import"./chunk-VZV7GLZT.js";import"./chunk-JQZ7BIAI.js";import"./chunk-OXJXKCLB.js";import"./chunk-E7WGCXWK.js";import{dist_exports}from"./chunk-ICLZNV4V.js";
3
- import"./chunk-SCIGZFN5.js";import"./chunk-KQM7ZGL6.js";import"./chunk-CIA6V3BP.js";import"./chunk-XQZG5HPT.js";import"./chunk-FACBDLFU.js";import"./chunk-N23FFKJU.js";import"./chunk-DUZY4PDA.js";import"./chunk-BRXQUQSC.js";import"./chunk-PEZZKT73.js";import"./chunk-DBL35X7L.js";import"./chunk-4X774RBJ.js";import"./chunk-RTFCP3VQ.js";import"./chunk-YURQPD6Y.js";import"./chunk-AKA7HNO3.js";import{compile_exports,value_exports2 as value_exports}from"./chunk-QMUIATLD.js";
2
+ import{dist_exports as dist_exports3}from"./chunk-IUZLRXBD.js";import{dist_exports as dist_exports2}from"./chunk-FHLF33QE.js";import"./chunk-3ZI2TEVB.js";import"./chunk-H5CZL7M5.js";import"./chunk-Q5TQLAOM.js";import"./chunk-2KKLZK2N.js";import{all_exports,compat_exports}from"./chunk-H6YXYISM.js";import"./chunk-VZV7GLZT.js";import"./chunk-JQZ7BIAI.js";import"./chunk-OXJXKCLB.js";import"./chunk-E7WGCXWK.js";import{dist_exports}from"./chunk-ICLZNV4V.js";
3
+ import"./chunk-SCIGZFN5.js";import"./chunk-KQM7ZGL6.js";import"./chunk-CIA6V3BP.js";import"./chunk-XQZG5HPT.js";import"./chunk-FACBDLFU.js";import"./chunk-T45HXZW7.js";import"./chunk-DUZY4PDA.js";import"./chunk-BRXQUQSC.js";import"./chunk-PEZZKT73.js";import"./chunk-DBL35X7L.js";import"./chunk-4X774RBJ.js";import"./chunk-RTFCP3VQ.js";import"./chunk-YURQPD6Y.js";import"./chunk-AKA7HNO3.js";import{compile_exports,value_exports2 as value_exports}from"./chunk-QMUIATLD.js";
4
4
  import{build_exports}from"./chunk-BHM75BJJ.js";import"./chunk-JXWJOIH4.js";var oauth_exports={};var VIRTUAL_MODULES={typebox:build_exports,"typebox/compile":compile_exports,"typebox/value":value_exports,"@sinclair/typebox":build_exports,"@sinclair/typebox/compile":compile_exports,"@sinclair/typebox/value":value_exports,"@earendil-works/pi-agent-core":dist_exports2,"@earendil-works/pi-tui":dist_exports,"@earendil-works/pi-ai":compat_exports,"@earendil-works/pi-ai/compat":compat_exports,"@earendil-works/pi-ai/oauth":oauth_exports,"@earendil-works/pi-ai/providers/all":all_exports,"@earendil-w\
5
5
  orks/pi-coding-agent":dist_exports3,"@mariozechner/pi-agent-core":dist_exports2,"@mariozechner/pi-tui":dist_exports,"@mariozechner/pi-ai":compat_exports,"@mariozechner/pi-ai/compat":compat_exports,"@mariozechner/pi-ai/oauth":oauth_exports,"@mariozechner/pi-ai/providers/all":all_exports,"@mariozechner/pi-coding-agent":dist_exports3};export{VIRTUAL_MODULES};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire as __piCreateRequire } from "node:module"; const require = __piCreateRequire(import.meta.url);
3
- import{configureHttpDispatcher,main,warnIfDeprecatedCommand}from"./chunks/chunk-7LDXR4AN.js";import"./chunks/chunk-3ZI2TEVB.js";import"./chunks/chunk-H5CZL7M5.js";import"./chunks/chunk-UBQSONVR.js";import"./chunks/chunk-2KKLZK2N.js";import"./chunks/chunk-OYDXJK4L.js";import"./chunks/chunk-VZV7GLZT.js";import"./chunks/chunk-JQZ7BIAI.js";import"./chunks/chunk-OXJXKCLB.js";import"./chunks/chunk-E7WGCXWK.js";import"./chunks/chunk-ICLZNV4V.js";import"./chunks/chunk-SCIGZFN5.js";import"./chunks/chunk-KQM7ZGL6.js";
4
- import"./chunks/chunk-CIA6V3BP.js";import"./chunks/chunk-XQZG5HPT.js";import"./chunks/chunk-FACBDLFU.js";import"./chunks/chunk-N23FFKJU.js";import{APP_COMMAND,ENV_PREFIX}from"./chunks/chunk-DUZY4PDA.js";import"./chunks/chunk-BRXQUQSC.js";import"./chunks/chunk-PEZZKT73.js";import"./chunks/chunk-DBL35X7L.js";import"./chunks/chunk-4X774RBJ.js";import"./chunks/chunk-RTFCP3VQ.js";import"./chunks/chunk-YURQPD6Y.js";import"./chunks/chunk-AKA7HNO3.js";import"./chunks/chunk-QMUIATLD.js";import"./chunks/chunk-BHM75BJJ.js";
3
+ import{configureHttpDispatcher,main,warnIfDeprecatedCommand}from"./chunks/chunk-FHLF33QE.js";import"./chunks/chunk-3ZI2TEVB.js";import"./chunks/chunk-H5CZL7M5.js";import"./chunks/chunk-Q5TQLAOM.js";import"./chunks/chunk-2KKLZK2N.js";import"./chunks/chunk-H6YXYISM.js";import"./chunks/chunk-VZV7GLZT.js";import"./chunks/chunk-JQZ7BIAI.js";import"./chunks/chunk-OXJXKCLB.js";import"./chunks/chunk-E7WGCXWK.js";import"./chunks/chunk-ICLZNV4V.js";import"./chunks/chunk-SCIGZFN5.js";import"./chunks/chunk-KQM7ZGL6.js";
4
+ import"./chunks/chunk-CIA6V3BP.js";import"./chunks/chunk-XQZG5HPT.js";import"./chunks/chunk-FACBDLFU.js";import"./chunks/chunk-T45HXZW7.js";import{APP_COMMAND,ENV_PREFIX}from"./chunks/chunk-DUZY4PDA.js";import"./chunks/chunk-BRXQUQSC.js";import"./chunks/chunk-PEZZKT73.js";import"./chunks/chunk-DBL35X7L.js";import"./chunks/chunk-4X774RBJ.js";import"./chunks/chunk-RTFCP3VQ.js";import"./chunks/chunk-YURQPD6Y.js";import"./chunks/chunk-AKA7HNO3.js";import"./chunks/chunk-QMUIATLD.js";import"./chunks/chunk-BHM75BJJ.js";
5
5
  import"./chunks/chunk-JXWJOIH4.js";function setupCli(){process.title=APP_COMMAND,process.env.PI_CODING_AGENT="true",process.env[`${ENV_PREFIX}_CODING_AGENT`]="true",process.env.AI_AGENT="pi",process.emitWarning=(()=>{}),configureHttpDispatcher()}setupCli();warnIfDeprecatedCommand(process.argv.slice(2));main(process.argv.slice(2));
@@ -28,7 +28,7 @@
28
28
  "technical_review": ["sonnet-5", "opus-5-5"],
29
29
  "security_review": ["fable-5-1"],
30
30
  "qa_agent": ["gpt-6.1-sol"],
31
- "cheap": ["humain-node/qwen3.8-27b", "gpt-6.1-sol"],
31
+ "cheap": ["humain-node/qwen3.8-flash-next", "gpt-6.1-sol"],
32
32
  "mid": ["opus-5-5"],
33
33
  "premium": ["fable-5-1", "gpt-6.1-sol"],
34
34
  "frontier": ["fable-5-1"]
@@ -74,50 +74,50 @@
74
74
  }
75
75
  },
76
76
  "oss": {
77
- "description": "GLM 5.2 primaries; Kimi K3 backups, with GLM 5.3 Flash, Qwen 3.8 Flash Next and proprietary Grok 4.7 alternatives subject to verified runtime limits.",
77
+ "description": "GLM 5.3 Flash primaries; Kimi K3 and GLM 5 backups, with Qwen 3.8 Flash Next as the cheap-tier backup.",
78
78
  "tiers": {
79
- "cheap": "humain-node/glm-5.2",
80
- "mid": "humain-node/glm-5.2",
81
- "premium": "humain-node/glm-5.2",
82
- "frontier": "humain-node/glm-5.2"
79
+ "cheap": "humain-node/glm-5.3-flash",
80
+ "mid": "humain-node/glm-5.3-flash",
81
+ "premium": "humain-node/glm-5.3-flash",
82
+ "frontier": "humain-node/glm-5.3-flash"
83
83
  },
84
84
  "capabilities": {
85
- "lead": "humain-node/glm-5.2",
86
- "technical_review": "humain-node/glm-5.2",
87
- "qa_agent": "humain-node/glm-5.2"
85
+ "lead": "humain-node/glm-5.3-flash",
86
+ "technical_review": "humain-node/glm-5.3-flash",
87
+ "qa_agent": "humain-node/glm-5.3-flash"
88
88
  },
89
89
  "backups": {
90
- "cheap": ["humain-node/kimi-k3", "humain-node/glm-5.3-flash", "humain-node/qwen3.8-flash-next", "humain-node/grok-4.7"],
91
- "mid": ["humain-node/kimi-k3", "humain-node/glm-5.3-flash", "humain-node/grok-4.7"],
92
- "premium": ["humain-node/kimi-k3", "humain-node/grok-4.7"]
90
+ "cheap": ["humain-node/qwen3.8-flash-next", "humain-node/kimi-k3", "humain-node/glm-5"],
91
+ "mid": ["humain-node/kimi-k3", "humain-node/glm-5"],
92
+ "premium": ["humain-node/kimi-k3", "humain-node/glm-5"]
93
93
  }
94
94
  },
95
95
  "oss-first": {
96
- "description": "GLM 5.2 first, Kimi K3 and qualified Flash/Grok alternatives below frontier; retains guarded escalation and independent review. Grok is proprietary.",
96
+ "description": "GLM 5.3 Flash first, Kimi K3 and GLM 5 backups below frontier; retains guarded escalation and independent review.",
97
97
  "tiers": {
98
- "cheap": "humain-node/glm-5.2",
99
- "mid": "humain-node/glm-5.2",
100
- "premium": "humain-node/glm-5.2",
101
- "frontier": "humain-node/glm-5.2"
98
+ "cheap": "humain-node/glm-5.3-flash",
99
+ "mid": "humain-node/glm-5.3-flash",
100
+ "premium": "humain-node/glm-5.3-flash",
101
+ "frontier": "humain-node/glm-5.3-flash"
102
102
  },
103
103
  "capabilities": {
104
- "lead_small": "humain-node/glm-5.2",
105
- "lead": "humain-node/glm-5.2",
106
- "lead_large": "humain-node/glm-5.2",
107
- "technical_review": "humain-node/glm-5.2",
108
- "integration_review": "humain-node/glm-5.2",
109
- "migration_review": "humain-node/glm-5.2",
110
- "performance_review": "humain-node/glm-5.2",
111
- "api_contract_review": "humain-node/glm-5.2",
112
- "security_review": "humain-node/glm-5.2",
113
- "qa_agent": "humain-node/glm-5.2",
114
- "analysis_strong": "humain-node/glm-5.2",
115
- "architect": "humain-node/glm-5.2"
104
+ "lead_small": "humain-node/glm-5.3-flash",
105
+ "lead": "humain-node/glm-5.3-flash",
106
+ "lead_large": "humain-node/glm-5.3-flash",
107
+ "technical_review": "humain-node/glm-5.3-flash",
108
+ "integration_review": "humain-node/glm-5.3-flash",
109
+ "migration_review": "humain-node/glm-5.3-flash",
110
+ "performance_review": "humain-node/glm-5.3-flash",
111
+ "api_contract_review": "humain-node/glm-5.3-flash",
112
+ "security_review": "humain-node/glm-5.3-flash",
113
+ "qa_agent": "humain-node/glm-5.3-flash",
114
+ "analysis_strong": "humain-node/glm-5.3-flash",
115
+ "architect": "humain-node/glm-5.3-flash"
116
116
  },
117
117
  "backups": {
118
- "cheap": ["humain-node/kimi-k3", "humain-node/glm-5.3-flash", "humain-node/qwen3.8-flash-next", "humain-node/grok-4.7"],
119
- "mid": ["humain-node/kimi-k3", "humain-node/glm-5.3-flash", "humain-node/grok-4.7"],
120
- "premium": ["humain-node/kimi-k3", "humain-node/grok-4.7"]
118
+ "cheap": ["humain-node/qwen3.8-flash-next", "humain-node/kimi-k3", "humain-node/glm-5"],
119
+ "mid": ["humain-node/kimi-k3", "humain-node/glm-5"],
120
+ "premium": ["humain-node/kimi-k3", "humain-node/glm-5"]
121
121
  },
122
122
  "policy": {
123
123
  "escalation_target": "gpt-6.1-sol",
@@ -2,58 +2,38 @@
2
2
  "schema": "humain-flow-profile",
3
3
  "schemaVersion": 1,
4
4
  "id": "oss-first",
5
- "version": 1,
6
- "digest": "cc77fed370f78de3a1f73f6c677f42019630b2effcde68687690059d51041534",
5
+ "version": 2,
6
+ "digest": "c5a4d7cb883140754f18b4b50f1a4982ff2f0ca9b273050ed1a26ed6a43f2c14",
7
7
  "kind": "flow",
8
8
  "label": "OSS first",
9
- "description": "GLM 5.2 first, Kimi K3 and qualified Flash/Grok alternatives below frontier; retains guarded escalation and independent review. Grok is proprietary.",
9
+ "description": "Open-weight HUMAIN Node models for every role: GLM 5.3 Flash leads, Kimi K3 and GLM 5 back up.",
10
10
  "roles": {
11
11
  "scout": {
12
12
  "primary": {
13
13
  "provider": "humain-node",
14
- "model": "glm-5.2"
14
+ "model": "qwen3.8-flash-next"
15
15
  },
16
16
  "backups": [
17
- {
18
- "provider": "humain-node",
19
- "model": "kimi-k3"
20
- },
21
17
  {
22
18
  "provider": "humain-node",
23
19
  "model": "glm-5.3-flash"
24
- },
25
- {
26
- "provider": "humain-node",
27
- "model": "qwen3.8-flash-next"
28
- },
29
- {
30
- "provider": "humain-node",
31
- "model": "grok-4.7"
32
20
  }
33
21
  ],
34
- "effort": "medium"
22
+ "effort": "low"
35
23
  },
36
24
  "worker": {
37
25
  "primary": {
38
26
  "provider": "humain-node",
39
- "model": "glm-5.2"
27
+ "model": "glm-5.3-flash"
40
28
  },
41
29
  "backups": [
42
- {
43
- "provider": "humain-node",
44
- "model": "kimi-k3"
45
- },
46
- {
47
- "provider": "humain-node",
48
- "model": "glm-5.3-flash"
49
- },
50
30
  {
51
31
  "provider": "humain-node",
52
32
  "model": "qwen3.8-flash-next"
53
33
  },
54
34
  {
55
35
  "provider": "humain-node",
56
- "model": "grok-4.7"
36
+ "model": "kimi-k3"
57
37
  }
58
38
  ],
59
39
  "effort": "medium"
@@ -61,32 +41,20 @@
61
41
  "triage": {
62
42
  "primary": {
63
43
  "provider": "humain-node",
64
- "model": "glm-5.2"
44
+ "model": "qwen3.8-flash-next"
65
45
  },
66
46
  "backups": [
67
- {
68
- "provider": "humain-node",
69
- "model": "kimi-k3"
70
- },
71
47
  {
72
48
  "provider": "humain-node",
73
49
  "model": "glm-5.3-flash"
74
- },
75
- {
76
- "provider": "humain-node",
77
- "model": "qwen3.8-flash-next"
78
- },
79
- {
80
- "provider": "humain-node",
81
- "model": "grok-4.7"
82
50
  }
83
51
  ],
84
- "effort": "medium"
52
+ "effort": "low"
85
53
  },
86
54
  "implementer": {
87
55
  "primary": {
88
56
  "provider": "humain-node",
89
- "model": "glm-5.2"
57
+ "model": "glm-5.3-flash"
90
58
  },
91
59
  "backups": [
92
60
  {
@@ -95,11 +63,7 @@
95
63
  },
96
64
  {
97
65
  "provider": "humain-node",
98
- "model": "glm-5.3-flash"
99
- },
100
- {
101
- "provider": "humain-node",
102
- "model": "grok-4.7"
66
+ "model": "glm-5"
103
67
  }
104
68
  ],
105
69
  "effort": "medium"
@@ -107,7 +71,7 @@
107
71
  "lead": {
108
72
  "primary": {
109
73
  "provider": "humain-node",
110
- "model": "glm-5.2"
74
+ "model": "glm-5.3-flash"
111
75
  },
112
76
  "backups": [
113
77
  {
@@ -116,23 +80,32 @@
116
80
  },
117
81
  {
118
82
  "provider": "humain-node",
119
- "model": "grok-4.7"
83
+ "model": "glm-5"
120
84
  }
121
85
  ],
122
- "effort": "medium"
86
+ "effort": "high"
123
87
  },
124
88
  "lead_large": {
125
89
  "primary": {
126
90
  "provider": "humain-node",
127
- "model": "glm-5.2"
91
+ "model": "glm-5.3-flash"
128
92
  },
129
- "backups": [],
130
- "effort": "medium"
93
+ "backups": [
94
+ {
95
+ "provider": "humain-node",
96
+ "model": "kimi-k3"
97
+ },
98
+ {
99
+ "provider": "humain-node",
100
+ "model": "glm-5"
101
+ }
102
+ ],
103
+ "effort": "high"
131
104
  },
132
105
  "architect": {
133
106
  "primary": {
134
107
  "provider": "humain-node",
135
- "model": "glm-5.2"
108
+ "model": "glm-5.3-flash"
136
109
  },
137
110
  "backups": [
138
111
  {
@@ -141,15 +114,15 @@
141
114
  },
142
115
  {
143
116
  "provider": "humain-node",
144
- "model": "grok-4.7"
117
+ "model": "glm-5"
145
118
  }
146
119
  ],
147
- "effort": "medium"
120
+ "effort": "high"
148
121
  },
149
122
  "reviewer": {
150
123
  "primary": {
151
124
  "provider": "humain-node",
152
- "model": "glm-5.2"
125
+ "model": "glm-5.3-flash"
153
126
  },
154
127
  "backups": [
155
128
  {
@@ -158,19 +131,15 @@
158
131
  },
159
132
  {
160
133
  "provider": "humain-node",
161
- "model": "glm-5.3-flash"
162
- },
163
- {
164
- "provider": "humain-node",
165
- "model": "grok-4.7"
134
+ "model": "glm-5"
166
135
  }
167
136
  ],
168
- "effort": "medium"
137
+ "effort": "high"
169
138
  },
170
139
  "security_reviewer": {
171
140
  "primary": {
172
141
  "provider": "humain-node",
173
- "model": "glm-5.2"
142
+ "model": "glm-5.3-flash"
174
143
  },
175
144
  "backups": [
176
145
  {
@@ -179,15 +148,15 @@
179
148
  },
180
149
  {
181
150
  "provider": "humain-node",
182
- "model": "grok-4.7"
151
+ "model": "glm-5"
183
152
  }
184
153
  ],
185
- "effort": "medium"
154
+ "effort": "high"
186
155
  },
187
156
  "qa": {
188
157
  "primary": {
189
158
  "provider": "humain-node",
190
- "model": "glm-5.2"
159
+ "model": "glm-5.3-flash"
191
160
  },
192
161
  "backups": [
193
162
  {
@@ -196,11 +165,7 @@
196
165
  },
197
166
  {
198
167
  "provider": "humain-node",
199
- "model": "glm-5.3-flash"
200
- },
201
- {
202
- "provider": "humain-node",
203
- "model": "grok-4.7"
168
+ "model": "glm-5"
204
169
  }
205
170
  ],
206
171
  "effort": "medium"
@@ -2,8 +2,8 @@
2
2
  "schema": "humain-flow-profile",
3
3
  "schemaVersion": 1,
4
4
  "id": "premium",
5
- "version": 1,
6
- "digest": "fe2ec06366a216fb502234edacf7a05abc3a7aaa6dbe3aa445f7729b6e58d567",
5
+ "version": 2,
6
+ "digest": "5c4a43766e6e9cde7c11c6b14ad95fce8c76c2fc2845b9cb3255ea12ebac56f3",
7
7
  "kind": "flow",
8
8
  "label": "Premium",
9
9
  "description": "Mixed vendor (default): gpt-6-luna scouts/workers, gpt-6.1-sol standard lead and reviews, Anthropic opus-5-5 large lead and architect, astra security review, Anthropic sonnet-5-5 QA, Anthropic fable-5-1 frontier.",
@@ -16,7 +16,7 @@
16
16
  "backups": [
17
17
  {
18
18
  "provider": "humain-node",
19
- "model": "qwen3.8-27b"
19
+ "model": "qwen3.8-flash-next"
20
20
  },
21
21
  {
22
22
  "provider": "openai-codex",
@@ -33,7 +33,7 @@
33
33
  "backups": [
34
34
  {
35
35
  "provider": "humain-node",
36
- "model": "qwen3.8-27b"
36
+ "model": "qwen3.8-flash-next"
37
37
  },
38
38
  {
39
39
  "provider": "openai-codex",
@@ -50,7 +50,7 @@
50
50
  "backups": [
51
51
  {
52
52
  "provider": "humain-node",
53
- "model": "qwen3.8-27b"
53
+ "model": "qwen3.8-flash-next"
54
54
  },
55
55
  {
56
56
  "provider": "openai-codex",
@@ -28,7 +28,7 @@
28
28
  },
29
29
  "dependencies": {
30
30
  "@earendil-works/pi-tui": "1.1.0",
31
- "@humain/humain-code-contracts": "0.4.1",
31
+ "@humain/humain-code-contracts": "0.4.3",
32
32
  "typebox": "1.3.35"
33
33
  },
34
34
  "devDependencies": {
@@ -1,13 +1,13 @@
1
1
  import { createRequire as __piCreateRequire } from "node:module"; const require = __piCreateRequire(import.meta.url);
2
- import{ShowImagesSelectorComponent,ThemeSelectorComponent}from"./chunks/chunk-KMMH6Z2Y.js";import{ACCOUNT_RETURN_COOLDOWN_MS,ACCOUNT_RETURN_MAX_COOLDOWN_MS,AgentExecInputError,AgentSession,AgentSessionRuntime,AssistantMessageComponent,BashExecutionComponent,BorderedLoader,BranchSummaryMessageComponent,CompactionSummaryMessageComponent,CredentialSynchronizationError,CustomEditor,CustomMessageComponent,DEFAULT_COMPACTION_SETTINGS,DefaultPackageManager,DefaultResourceLoader,DynamicBorder,ExtensionEditorComponent,
2
+ import{ShowImagesSelectorComponent,ThemeSelectorComponent}from"./chunks/chunk-IUZLRXBD.js";import{ACCOUNT_RETURN_COOLDOWN_MS,ACCOUNT_RETURN_MAX_COOLDOWN_MS,AgentExecInputError,AgentSession,AgentSessionRuntime,AssistantMessageComponent,BashExecutionComponent,BorderedLoader,BranchSummaryMessageComponent,CompactionSummaryMessageComponent,CredentialSynchronizationError,CustomEditor,CustomMessageComponent,DEFAULT_COMPACTION_SETTINGS,DefaultPackageManager,DefaultResourceLoader,DynamicBorder,ExtensionEditorComponent,
3
3
  ExtensionInputComponent,ExtensionRunner,ExtensionSelectorComponent,FooterComponent,InteractiveMode,LoginDialogComponent,ModelRegistry,ModelRuntime,ModelSelectorComponent,OAuthAccountPool,OAuthSelectorComponent,RpcClient,SessionSelectorComponent,SettingsManager,SettingsSelectorComponent,SkillInvocationMessageComponent,ThinkingSelectorComponent,ToolExecutionComponent,TreeSelectorComponent,UserMessageComponent,UserMessageSelectorComponent,VIRTUAL_MODEL_STATE_ENTRY,calculateContextTokens,collectEntriesForBranchSummary,
4
4
  compact,convertToPng,copyToClipboard,createAgentSession,createAgentSessionFromServices,createAgentSessionRuntime,createAgentSessionServices,createBashTool,createBashToolDefinition,createCodemodeExtension,createCodingTools,createEditTool,createEditToolDefinition,createEventBus,createExtensionRuntime,createFindTool,createFindToolDefinition,createGrepTool,createGrepToolDefinition,createLocalBashOperations,createLocalPowerShellOperations,createLsTool,createLsToolDefinition,createMcpExtension,createPiAgentExecutionHost,
5
5
  createPowerShellTool,createPowerShellToolDefinition,createReadOnlyTools,createReadTool,createReadToolDefinition,createSubagentTool,createSyntheticSourceInfo,createToolSearchExtension,createWriteTool,createWriteToolDefinition,defineTool,detectSupportedImageMimeTypeFromFile,discoverAgents,discoverAndLoadExtensions,estimateTokens,executeHumainAgentRequest,findCutPoint,findTurnStartIndex,formatSkillsForPrompt,generateBranchSummary,generateDiffString,generateSummary,generateSummaryWithUsage,generateUnifiedPatch,
6
6
  getFlowChildLaunchHost,getFlowControlHost,getFlowTraceProducer,getLastAssistantUsage,isBashToolResult,isEditToolResult,isFindToolResult,isGrepToolResult,isLsToolResult,isPowerShellToolResult,isReadToolResult,isToolCallEventType,isWriteToolResult,loadProjectContextFiles,loadSkills,loadSkillsFromDir,main,parseArgs,parseFrontmatter,parseSkillBlock,prepareBranchEntries,prepareChildLaunch,renderDiff,renderTaskWithContext,resolveCliModel,resolveModelScopeWithDiagnostics,runAgentExecMode,runPrintMode,runRpcMode,
7
- serializeConversation,shouldCompact,stripFrontmatter,withFileMutationQueue,wrapRegisteredTool,wrapRegisteredTools}from"./chunks/chunk-7LDXR4AN.js";import"./chunks/chunk-3ZI2TEVB.js";import{ProjectTrustStore,hasTrustRequiringProjectResources}from"./chunks/chunk-H5CZL7M5.js";import"./chunks/chunk-UBQSONVR.js";import{CURRENT_SESSION_VERSION,SessionManager,buildContextEntries,buildSessionContext,buildSessionProjection,convertToLlm,formatDimensionNote,getLatestCompactionEntry,migrateSessionEntries,parseSessionEntries,
8
- resizeImage,sessionEntryToContextMessages}from"./chunks/chunk-2KKLZK2N.js";import"./chunks/chunk-OYDXJK4L.js";import"./chunks/chunk-VZV7GLZT.js";import{readStoredCredential}from"./chunks/chunk-JQZ7BIAI.js";import{DEFAULT_MAX_BYTES,DEFAULT_MAX_LINES,formatSize,getPowerShellConfig,getShellConfig,truncateHead,truncateLine,truncateTail,truncateToVisualLines}from"./chunks/chunk-OXJXKCLB.js";import{ArminComponent}from"./chunks/chunk-E7WGCXWK.js";import{Theme,getLanguageFromPath,getMarkdownTheme,getSelectListTheme,
7
+ serializeConversation,shouldCompact,stripFrontmatter,withFileMutationQueue,wrapRegisteredTool,wrapRegisteredTools}from"./chunks/chunk-FHLF33QE.js";import"./chunks/chunk-3ZI2TEVB.js";import{ProjectTrustStore,hasTrustRequiringProjectResources}from"./chunks/chunk-H5CZL7M5.js";import"./chunks/chunk-Q5TQLAOM.js";import{CURRENT_SESSION_VERSION,SessionManager,buildContextEntries,buildSessionContext,buildSessionProjection,convertToLlm,formatDimensionNote,getLatestCompactionEntry,migrateSessionEntries,parseSessionEntries,
8
+ resizeImage,sessionEntryToContextMessages}from"./chunks/chunk-2KKLZK2N.js";import"./chunks/chunk-H6YXYISM.js";import"./chunks/chunk-VZV7GLZT.js";import{readStoredCredential}from"./chunks/chunk-JQZ7BIAI.js";import{DEFAULT_MAX_BYTES,DEFAULT_MAX_LINES,formatSize,getPowerShellConfig,getShellConfig,truncateHead,truncateLine,truncateTail,truncateToVisualLines}from"./chunks/chunk-OXJXKCLB.js";import{ArminComponent}from"./chunks/chunk-E7WGCXWK.js";import{Theme,getLanguageFromPath,getMarkdownTheme,getSelectListTheme,
9
9
  getSettingsListTheme,highlightCode,initTheme,keyHint,keyText,rawKeyHint}from"./chunks/chunk-ICLZNV4V.js";import"./chunks/chunk-SCIGZFN5.js";import"./chunks/chunk-KQM7ZGL6.js";import"./chunks/chunk-CIA6V3BP.js";import"./chunks/chunk-XQZG5HPT.js";import"./chunks/chunk-FACBDLFU.js";import{HUMAIN_AGENT_EXECUTION_FAILURE_CODES,HUMAIN_AGENT_EXECUTION_SCHEMA_VERSION,HumainAgentArtifactSchema,HumainAgentExecutionClaimSchema,HumainAgentExecutionControlsSchema,HumainAgentExecutionOutcomeSchema,HumainAgentExecutionRequestSchema,
10
- HumainAgentExecutionResponseSchema,HumainAgentRouteRefSchema,HumainAgentUsageSchema,parseHumainAgentExecutionRequest,parseHumainAgentExecutionResponse}from"./chunks/chunk-N23FFKJU.js";import{CONFIG_DIR_NAME,UPSTREAM_PI_VERSION,VERSION,getAgentDir,getDocsPath,getExamplesPath,getPackageDir,getReadmePath}from"./chunks/chunk-DUZY4PDA.js";import"./chunks/chunk-BRXQUQSC.js";import"./chunks/chunk-PEZZKT73.js";import"./chunks/chunk-DBL35X7L.js";import"./chunks/chunk-4X774RBJ.js";import"./chunks/chunk-RTFCP3VQ.js";
10
+ HumainAgentExecutionResponseSchema,HumainAgentRouteRefSchema,HumainAgentUsageSchema,parseHumainAgentExecutionRequest,parseHumainAgentExecutionResponse}from"./chunks/chunk-T45HXZW7.js";import{CONFIG_DIR_NAME,UPSTREAM_PI_VERSION,VERSION,getAgentDir,getDocsPath,getExamplesPath,getPackageDir,getReadmePath}from"./chunks/chunk-DUZY4PDA.js";import"./chunks/chunk-BRXQUQSC.js";import"./chunks/chunk-PEZZKT73.js";import"./chunks/chunk-DBL35X7L.js";import"./chunks/chunk-4X774RBJ.js";import"./chunks/chunk-RTFCP3VQ.js";
11
11
  import"./chunks/chunk-YURQPD6Y.js";import"./chunks/chunk-AKA7HNO3.js";import"./chunks/chunk-QMUIATLD.js";import"./chunks/chunk-BHM75BJJ.js";import"./chunks/chunk-JXWJOIH4.js";export{ACCOUNT_RETURN_COOLDOWN_MS,ACCOUNT_RETURN_MAX_COOLDOWN_MS,AgentExecInputError,AgentSession,AgentSessionRuntime,ArminComponent,AssistantMessageComponent,BashExecutionComponent,BorderedLoader,BranchSummaryMessageComponent,CONFIG_DIR_NAME,CURRENT_SESSION_VERSION,CompactionSummaryMessageComponent,CredentialSynchronizationError,CustomEditor,CustomMessageComponent,DEFAULT_COMPACTION_SETTINGS,DEFAULT_MAX_BYTES,DEFAULT_MAX_LINES,DefaultPackageManager,DefaultResourceLoader,DynamicBorder,ExtensionEditorComponent,
12
12
  ExtensionInputComponent,ExtensionRunner,ExtensionSelectorComponent,FooterComponent,HUMAIN_AGENT_EXECUTION_FAILURE_CODES,HUMAIN_AGENT_EXECUTION_SCHEMA_VERSION,HumainAgentArtifactSchema,HumainAgentExecutionClaimSchema,HumainAgentExecutionControlsSchema,HumainAgentExecutionOutcomeSchema,HumainAgentExecutionRequestSchema,HumainAgentExecutionResponseSchema,HumainAgentRouteRefSchema,HumainAgentUsageSchema,InteractiveMode,LoginDialogComponent,ModelRegistry,ModelRuntime,ModelSelectorComponent,OAuthAccountPool,
13
13
  OAuthSelectorComponent,ProjectTrustStore,RpcClient,SessionManager,SessionSelectorComponent,SettingsManager,SettingsSelectorComponent,ShowImagesSelectorComponent,SkillInvocationMessageComponent,Theme,ThemeSelectorComponent,ThinkingSelectorComponent,ToolExecutionComponent,TreeSelectorComponent,UPSTREAM_PI_VERSION,UserMessageComponent,UserMessageSelectorComponent,VERSION,VIRTUAL_MODEL_STATE_ENTRY,buildContextEntries,buildSessionContext,buildSessionProjection,calculateContextTokens,collectEntriesForBranchSummary,
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire as __piCreateRequire } from "node:module"; const require = __piCreateRequire(import.meta.url);
3
- import{configureHttpDispatcher,main}from"./chunks/chunk-7LDXR4AN.js";import"./chunks/chunk-3ZI2TEVB.js";import"./chunks/chunk-H5CZL7M5.js";import"./chunks/chunk-UBQSONVR.js";import"./chunks/chunk-2KKLZK2N.js";import"./chunks/chunk-OYDXJK4L.js";import"./chunks/chunk-VZV7GLZT.js";import"./chunks/chunk-JQZ7BIAI.js";import"./chunks/chunk-OXJXKCLB.js";import"./chunks/chunk-E7WGCXWK.js";import"./chunks/chunk-ICLZNV4V.js";import"./chunks/chunk-SCIGZFN5.js";import"./chunks/chunk-KQM7ZGL6.js";import"./chunks/chunk-CIA6V3BP.js";
4
- import"./chunks/chunk-XQZG5HPT.js";import"./chunks/chunk-FACBDLFU.js";import"./chunks/chunk-N23FFKJU.js";import{APP_COMMAND}from"./chunks/chunk-DUZY4PDA.js";import"./chunks/chunk-BRXQUQSC.js";import"./chunks/chunk-PEZZKT73.js";import"./chunks/chunk-DBL35X7L.js";import"./chunks/chunk-4X774RBJ.js";import"./chunks/chunk-RTFCP3VQ.js";import"./chunks/chunk-YURQPD6Y.js";import"./chunks/chunk-AKA7HNO3.js";import"./chunks/chunk-QMUIATLD.js";import"./chunks/chunk-BHM75BJJ.js";import"./chunks/chunk-JXWJOIH4.js";process.title=`${APP_COMMAND}-rpc`;process.env.PI_CODING_AGENT="true";process.env.AI_AGENT="pi";process.emitWarning=(()=>{});configureHttpDispatcher();main(["--mode","rpc",...process.argv.slice(2)]);
3
+ import{configureHttpDispatcher,main}from"./chunks/chunk-FHLF33QE.js";import"./chunks/chunk-3ZI2TEVB.js";import"./chunks/chunk-H5CZL7M5.js";import"./chunks/chunk-Q5TQLAOM.js";import"./chunks/chunk-2KKLZK2N.js";import"./chunks/chunk-H6YXYISM.js";import"./chunks/chunk-VZV7GLZT.js";import"./chunks/chunk-JQZ7BIAI.js";import"./chunks/chunk-OXJXKCLB.js";import"./chunks/chunk-E7WGCXWK.js";import"./chunks/chunk-ICLZNV4V.js";import"./chunks/chunk-SCIGZFN5.js";import"./chunks/chunk-KQM7ZGL6.js";import"./chunks/chunk-CIA6V3BP.js";
4
+ import"./chunks/chunk-XQZG5HPT.js";import"./chunks/chunk-FACBDLFU.js";import"./chunks/chunk-T45HXZW7.js";import{APP_COMMAND}from"./chunks/chunk-DUZY4PDA.js";import"./chunks/chunk-BRXQUQSC.js";import"./chunks/chunk-PEZZKT73.js";import"./chunks/chunk-DBL35X7L.js";import"./chunks/chunk-4X774RBJ.js";import"./chunks/chunk-RTFCP3VQ.js";import"./chunks/chunk-YURQPD6Y.js";import"./chunks/chunk-AKA7HNO3.js";import"./chunks/chunk-QMUIATLD.js";import"./chunks/chunk-BHM75BJJ.js";import"./chunks/chunk-JXWJOIH4.js";process.title=`${APP_COMMAND}-rpc`;process.env.PI_CODING_AGENT="true";process.env.AI_AGENT="pi";process.emitWarning=(()=>{});configureHttpDispatcher();main(["--mode","rpc",...process.argv.slice(2)]);
@@ -183,6 +183,8 @@ export interface TaskContext {
183
183
  acceptance?: string[];
184
184
  baseRevision?: string;
185
185
  }
186
+ /** JSON array of canonical `provider/model` strings a frozen-profile Flow run may launch; set by Flow in child env. */
187
+ export declare const RESIDENT_MODELS_ENV = "HUMAIN_ORCHESTRATOR_RESIDENT_MODELS";
186
188
  declare const SubagentParams: Type.TObject<{
187
189
  agent: Type.TOptional<Type.TString>;
188
190
  task: Type.TOptional<Type.TString>;
@@ -1 +1 @@
1
- {"version":3,"file":"subagent.d.ts","sourceRoot":"","sources":["../../../src/core/tools/subagent.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAOH,OAAO,KAAK,EAAO,OAAO,EAAgB,MAAM,uBAAuB,CAAC;AAQxE,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAM/B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;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AE,MAAM,2EAE7C"}
@@ -937,6 +937,38 @@ const TaskItem = Type.Object({
937
937
  baseRevision: Type.Optional(Type.String({ description: "Git revision the packet was assembled against." })),
938
938
  }, { description: "Bounded context packet for this child." })),
939
939
  });
940
+ /** JSON array of canonical `provider/model` strings a frozen-profile Flow run may launch; set by Flow in child env. */
941
+ export const RESIDENT_MODELS_ENV = "HUMAIN_ORCHESTRATOR_RESIDENT_MODELS";
942
+ function isCanonicalEntry(entry) {
943
+ if (typeof entry !== "string")
944
+ return false;
945
+ const slash = entry.indexOf("/");
946
+ return slash > 0 && slash < entry.length - 1;
947
+ }
948
+ /** Only an undefined env var is unrestricted; empty, `[]`, non-array or any malformed entry refuses every launch. */
949
+ function readResidentModels() {
950
+ const raw = process.env[RESIDENT_MODELS_ENV];
951
+ if (raw === undefined)
952
+ return undefined;
953
+ try {
954
+ const parsed = JSON.parse(raw);
955
+ if (Array.isArray(parsed) && parsed.length > 0 && parsed.every(isCanonicalEntry))
956
+ return { models: parsed };
957
+ }
958
+ catch {
959
+ /* fall through: fail closed */
960
+ }
961
+ return { error: `${RESIDENT_MODELS_ENV} is malformed; refusing all subagent launches (frozen profile residency).` };
962
+ }
963
+ /** Canonical resident `provider/model`: an exact entry, or the single entry whose model part equals a bare id. */
964
+ function canonicalResidentModel(model, resident) {
965
+ if (resident.includes(model))
966
+ return model;
967
+ if (model.includes("/"))
968
+ return undefined;
969
+ const matches = resident.filter((entry) => entry.slice(entry.indexOf("/") + 1) === model);
970
+ return matches.length === 1 ? matches[0] : undefined;
971
+ }
940
972
  const ChainItem = Type.Object({
941
973
  agent: Type.String({ description: "Name of the agent to invoke" }),
942
974
  task: Type.String({ description: "Task with optional {previous} placeholder for prior output" }),
@@ -1279,10 +1311,10 @@ export function createSubagentToolDefinition(cwd) {
1279
1311
  return [{ agent: params.agent, task: params.task, taskId: `${toolCallId}-0` }];
1280
1312
  return [];
1281
1313
  };
1282
- const stubResult = (child, errorMessage) => ({
1314
+ const stubResult = (child, errorMessage, redactTask = false) => ({
1283
1315
  agent: child.agent,
1284
1316
  agentSource: "unknown",
1285
- task: child.task ?? "",
1317
+ task: redactTask ? "" : (child.task ?? ""),
1286
1318
  taskId: child.taskId ?? `${toolCallId}-${child.step !== undefined ? child.step - 1 : 0}`,
1287
1319
  parentTaskId: currentTaskId() ?? toolCallId,
1288
1320
  depth: currentSubagentDepth() + 1,
@@ -1294,7 +1326,7 @@ export function createSubagentToolDefinition(cwd) {
1294
1326
  step: child.step,
1295
1327
  isolation: "shared",
1296
1328
  });
1297
- const stubAllChildren = (errorMessage) => requestedChildren().map((child) => stubResult(child, errorMessage));
1329
+ const stubAllChildren = (errorMessage, redactTask = false) => requestedChildren().map((child) => stubResult(child, errorMessage, redactTask));
1298
1330
  const makeDetails = (mode) => (results) => ({
1299
1331
  mode,
1300
1332
  agentScope,
@@ -1344,6 +1376,43 @@ export function createSubagentToolDefinition(cwd) {
1344
1376
  isError: true,
1345
1377
  };
1346
1378
  }
1379
+ // Frozen-profile residency: refuse before admission, then launch every child with its canonical
1380
+ // resident provider/model so the child CLI cannot re-resolve a bare id to another provider.
1381
+ const residency = readResidentModels();
1382
+ if (residency) {
1383
+ const parentCanonical = `${parentModel.provider}/${parentModel.id}`;
1384
+ let refused;
1385
+ const resolve = (model) => {
1386
+ if (refused)
1387
+ return model;
1388
+ if ("error" in residency) {
1389
+ refused = residency.error;
1390
+ return model;
1391
+ }
1392
+ const wanted = model ?? parentCanonical;
1393
+ const canonical = canonicalResidentModel(wanted, residency.models);
1394
+ if (!canonical)
1395
+ refused = `Model "${wanted}" is outside the frozen Flow profile; subagent launch refused.`;
1396
+ return canonical ?? model;
1397
+ };
1398
+ if (params.agent)
1399
+ params.model = resolve(params.model);
1400
+ for (const step of params.chain ?? [])
1401
+ step.model = resolve(step.model);
1402
+ for (const t of params.tasks ?? []) {
1403
+ t.model = resolve(t.model);
1404
+ if (t.onFailure?.retryWith?.model !== undefined)
1405
+ t.onFailure.retryWith.model = resolve(t.onFailure.retryWith.model);
1406
+ }
1407
+ if (!params.agent && !params.chain?.length && !params.tasks?.length)
1408
+ resolve(undefined);
1409
+ if (refused)
1410
+ return {
1411
+ content: [{ type: "text", text: refused }],
1412
+ details: makeDetails(hasChain ? "chain" : hasTasks ? "parallel" : "single")(stubAllChildren(`not run: ${refused}`, true)),
1413
+ isError: true,
1414
+ };
1415
+ }
1347
1416
  if ((agentScope === "project" || agentScope === "both") &&
1348
1417
  confirmProjectAgents &&
1349
1418
  ctx?.hasUI &&