osuite 2.9.5 → 2.9.6

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 (3) hide show
  1. package/README.md +1 -1
  2. package/cli.js +31 -1
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # OSuite SDK (v2.9.5)
1
+ # OSuite SDK (v2.9.6)
2
2
 
3
3
  **Governed action SDK for AI agents.**
4
4
 
package/cli.js CHANGED
@@ -169,6 +169,31 @@ function defaultAgentIdForRuntime(runtime) {
169
169
  return 'sdk-runtime';
170
170
  }
171
171
 
172
+ function sanitizeConfiguredAgentId(runtime, agentId) {
173
+ const value = String(agentId || '').trim();
174
+ if (!value) return '';
175
+ const knownDefaults = {
176
+ codex: 'codex-runtime',
177
+ claude: 'claude-code-runtime',
178
+ mcp: 'mcp-runtime',
179
+ sdk: 'sdk-runtime',
180
+ };
181
+ const foreignDefault = Object.entries(knownDefaults).some(([otherRuntime, defaultId]) => (
182
+ otherRuntime !== runtime && value === defaultId
183
+ ));
184
+ return foreignDefault ? '' : value;
185
+ }
186
+
187
+ function runtimeMatchesConfiguredAdapter(runtime, adapterId) {
188
+ const adapter = String(adapterId || '').trim().toLowerCase();
189
+ if (!adapter) return false;
190
+ if (runtime === 'codex') return adapter === 'codex_hooks';
191
+ if (runtime === 'claude') return adapter === 'claude_code_hooks' || adapter === 'claude_hooks';
192
+ if (runtime === 'mcp') return adapter.includes('mcp');
193
+ if (runtime === 'sdk') return ['sdk', 'framework_sdk', 'inline_sdk'].includes(adapter);
194
+ return false;
195
+ }
196
+
172
197
  function envPathForRuntime(runtime) {
173
198
  if (runtime === 'codex') return '.codex/.env';
174
199
  if (runtime === 'claude') return '.claude/.env';
@@ -672,7 +697,12 @@ async function connect(target = 'auto', args = {}) {
672
697
  const config = readConfig();
673
698
  const runtime = detectRuntimeTarget(target);
674
699
  const baseUrl = normalizedBaseUrl(args['base-url'] || config.baseUrl || DEFAULT_BASE_URL);
675
- const configuredAgentId = envValue('OSUITE_AGENT_ID', 'DASHCLAW_AGENT_ID');
700
+ const configuredAgentId = sanitizeConfiguredAgentId(
701
+ runtime,
702
+ runtimeMatchesConfiguredAdapter(runtime, config.runtimeAdapterId)
703
+ ? envValue('OSUITE_AGENT_ID', 'DASHCLAW_AGENT_ID')
704
+ : '',
705
+ );
676
706
  const agentId = String(args['agent-id'] || configuredAgentId || defaultAgentIdForRuntime(runtime));
677
707
  const dryRunCode = String(args.code || generateConnectCode()).trim() || generateConnectCode();
678
708
  let connectPayload = null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "osuite",
3
- "version": "2.9.5",
3
+ "version": "2.9.6",
4
4
  "description": "OSuite governed action SDK for AI agents. Approve, replay, prove, and verify runtime decisions.",
5
5
  "type": "module",
6
6
  "publishConfig": {