query_voc.py 497 B

1234567891011
  1. """Agent entry: accepts read operations only; uses the private local library."""
  2. import sys
  3. # Keep the installed, checksummed skill immutable during normal queries.
  4. sys.dont_write_bytecode = True
  5. import voc_db
  6. if __name__ == '__main__':
  7. if len(sys.argv) < 2 or sys.argv[1] not in ('contract','query','search','aggregate','facets','get','source','verify'):
  8. print('{"ok":false,"error":{"code":"READ_COMMAND_REQUIRED"}}', file=sys.stderr)
  9. sys.exit(1)
  10. sys.exit(voc_db.main())