atris 3.15.40 → 3.15.41

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/ax CHANGED
@@ -287,7 +287,7 @@ function defaultAuthority(id) {
287
287
  if (key === 'google_drive') return { list_files: 'read_only', search_files: 'read_only', download_file: 'read_only', upload_file: 'approval_required' };
288
288
  if (key === 'google_docs') return { list_documents: 'read_only', get_document: 'read_only', create_document: 'approval_required' };
289
289
  if (key === 'github') return { list_repos: 'read_only', get_repo: 'read_only', list_issues: 'read_only', create_issue: 'approval_required' };
290
- if (key === 'slack') return { list_channels: 'read_only', search_messages: 'read_only', post_message: 'approval_required' };
290
+ if (key === 'slack') return { list_channels: 'read_only', list_messages: 'read_only', post_message: 'approval_required' };
291
291
  if (key === 'linear') return { list_issues: 'read_only', get_issue: 'read_only', create_issue: 'approval_required' };
292
292
  if (key === 'notion') return { search: 'read_only', get_page: 'read_only', create_page: 'approval_required' };
293
293
  if (key === 'hubspot') return { list_contacts: 'read_only', search_contacts: 'read_only', create_contact: 'approval_required' };
@@ -324,6 +324,20 @@ function statusConnected(statuses, id) {
324
324
  return false;
325
325
  }
326
326
 
327
+ function cachedIntegrationStatus(options = {}) {
328
+ const homeDir = options.homeDir || os.homedir();
329
+ try {
330
+ const raw = fs.readFileSync(path.join(homeDir, '.obelisk', 'integrations-status.json'), 'utf8');
331
+ const parsed = JSON.parse(raw);
332
+ if (parsed && parsed.status && typeof parsed.status === 'object') return parsed.status;
333
+ if (parsed && parsed.statuses && typeof parsed.statuses === 'object') return parsed.statuses;
334
+ if (parsed && typeof parsed === 'object') return parsed;
335
+ } catch (_) {
336
+ return {};
337
+ }
338
+ return {};
339
+ }
340
+
327
341
  async function buildConnectionContext(options = {}) {
328
342
  const token = options.token || authToken();
329
343
  const localStatusUserId = isLoopbackBackend() ? authUserId() : '';
@@ -331,11 +345,22 @@ async function buildConnectionContext(options = {}) {
331
345
  ? `${ATRIS2_CONNECTION_STATUS_PATH}?connection_user_id=${encodeURIComponent(localStatusUserId)}`
332
346
  : CONNECTION_STATUS_PATH;
333
347
  const [statusRes, contractRes] = await Promise.all([
334
- localStatusUserId || token ? requestJson(statusPath, { token: localStatusUserId ? '' : token }) : Promise.resolve({ ok: false, data: null }),
335
- requestJson(CONNECTION_CAPABILITIES_PATH, { token: '' })
348
+ options.statusRes
349
+ ? Promise.resolve(options.statusRes)
350
+ : localStatusUserId || token
351
+ ? requestJson(statusPath, { token: localStatusUserId ? '' : token })
352
+ : Promise.resolve({ ok: false, data: null }),
353
+ options.contractRes ? Promise.resolve(options.contractRes) : requestJson(CONNECTION_CAPABILITIES_PATH, { token: '' })
336
354
  ]);
337
355
  const statusData = statusRes.ok && statusRes.data && typeof statusRes.data === 'object' ? statusRes.data : {};
338
- const statuses = statusData.statuses && typeof statusData.statuses === 'object' ? statusData.statuses : statusData;
356
+ const backendStatuses = statusData.statuses && typeof statusData.statuses === 'object' ? statusData.statuses : statusData;
357
+ const cacheStatuses = statusRes.ok ? {} : cachedIntegrationStatus({ homeDir: options.integrationStatusHomeDir });
358
+ const statuses = Object.keys(backendStatuses).length ? backendStatuses : cacheStatuses;
359
+ const statusSource = Object.keys(backendStatuses).length
360
+ ? 'backend'
361
+ : Object.keys(cacheStatuses).length
362
+ ? 'local_cache'
363
+ : 'fallback';
339
364
  const contractConnectors = new Map();
340
365
  if (contractRes.ok && contractRes.data && Array.isArray(contractRes.data.connectors)) {
341
366
  for (const connector of contractRes.data.connectors) {
@@ -368,6 +393,8 @@ async function buildConnectionContext(options = {}) {
368
393
  schema: 'atris.connection_capabilities.v1',
369
394
  source: 'ax',
370
395
  stale: false,
396
+ connection_status_source: statusSource,
397
+ status_source: statusSource,
371
398
  capability_contract_source: contractRes.ok ? 'backend' : 'fallback',
372
399
  capability_contract_schema: contractRes.data && contractRes.data.schema,
373
400
  capability_contract_connectors: contractConnectors.size || undefined,
@@ -828,6 +855,14 @@ function handleEvent(event, state, output) {
828
855
  return;
829
856
  }
830
857
 
858
+ if (event.type === 'result' && event.result && !state.output) {
859
+ const content = String(event.result || '');
860
+ state.output += content;
861
+ if (output && output.isTTY) writeStreamingText(state, output, content);
862
+ else state.pendingText += content;
863
+ return;
864
+ }
865
+
831
866
  if (event.type === 'error' || event.error) {
832
867
  state.errors.push(event.error || event.message || 'Atris2 stream error');
833
868
  }
@@ -1237,6 +1272,7 @@ module.exports = {
1237
1272
  backendBaseUrl,
1238
1273
  backendUrl,
1239
1274
  buildPayload,
1275
+ cachedIntegrationStatus,
1240
1276
  buildConnectionContext,
1241
1277
  buildRunProfile,
1242
1278
  chat,
package/commands/gm.js CHANGED
@@ -150,13 +150,13 @@ function playersFromWorkspace(workspaceRoot) {
150
150
  }
151
151
 
152
152
  function starterMissionTitle() {
153
- return 'AgentXP Mode first rep: complete one proof-backed customer-motion mission';
153
+ return 'AgentXP Mode first rep: complete one proof-backed useful mission';
154
154
  }
155
155
 
156
156
  function starterMissionPrompt(player) {
157
157
  return [
158
158
  `Player ${player}: enter AgentXP Mode in this local workspace.`,
159
- 'Pick one concrete customer-motion rep you can finish today.',
159
+ 'Pick one small useful contribution you can finish today: improve a doc, verify setup, create a handoff, or fix a tiny tool.',
160
160
  'Use an agent for the artifact and verifier proof.',
161
161
  'Human accept/revise gates the XP.',
162
162
  ].join(' ');
package/commands/play.js CHANGED
@@ -242,14 +242,14 @@ function selectMission(tasks, player) {
242
242
  }
243
243
 
244
244
  function starterMissionTitle() {
245
- return 'AgentXP Mode first rep: complete one proof-backed customer-motion mission';
245
+ return 'AgentXP Mode first rep: complete one proof-backed useful mission';
246
246
  }
247
247
 
248
248
  function starterMissionPrompt(player) {
249
249
  return [
250
250
  `Player ${player}: enter AgentXP Mode in this local workspace.`,
251
- 'Pick one concrete Atris Labs customer-motion rep you can finish today.',
252
- 'Have an agent help create a real artifact and verifier proof.',
251
+ 'Pick one small useful contribution you can finish today: improve a doc, verify setup, create a handoff, or fix a tiny tool.',
252
+ 'Have an agent help produce a real artifact plus verifier proof.',
253
253
  'Do not self-accept; when proof is ready, show accept/revise.',
254
254
  'Win condition: one accepted proof-backed rep visible on the local AgentXP card.',
255
255
  ].join(' ');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "atris",
3
- "version": "3.15.40",
3
+ "version": "3.15.41",
4
4
  "main": "bin/atris.js",
5
5
  "bin": {
6
6
  "atris": "bin/atris.js",